props/Props-Modules/test/Props.Shop/Adafruit.Tests/AdafruitShopTest.cs
Harrison Deng c94ea4a624 Added primitive search mechanism in backend.
Began implementing search mechanism for frontend.
2021-08-05 01:22:19 -05:00

23 lines
648 B
C#

using System.Collections.Generic;
using System.Threading.Tasks;
using Props.Shop.Framework;
using Xunit;
namespace Props.Shop.Adafruit.Tests
{
public class AdafruitShopTest
{
[Fact]
public async Task TestSearch() {
AdafruitShop mockAdafruitShop = new AdafruitShop();
mockAdafruitShop.Initialize(null);
await mockAdafruitShop.InitializeAsync(null);
int count = 0;
foreach (ProductListing listing in mockAdafruitShop.Search("raspberry pi", new Filters()))
{
count += 1;
}
Assert.True(count > 0);
}
}
}