2021-08-07 22:20:46 +00:00
|
|
|
using System.Linq;
|
|
|
|
using Microsoft.Extensions.Logging;
|
2021-08-05 06:22:19 +00:00
|
|
|
using Props.Shop.Framework;
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
namespace Props.Shop.Adafruit.Tests
|
|
|
|
{
|
|
|
|
public class AdafruitShopTest
|
|
|
|
{
|
|
|
|
[Fact]
|
2022-04-24 06:25:46 +00:00
|
|
|
public async void TestSearch()
|
|
|
|
{
|
2021-08-05 06:22:19 +00:00
|
|
|
AdafruitShop mockAdafruitShop = new AdafruitShop();
|
2022-04-24 06:25:46 +00:00
|
|
|
await mockAdafruitShop.Initialize(null, LoggerFactory.Create(builder =>
|
|
|
|
{
|
2021-08-07 22:20:46 +00:00
|
|
|
builder.AddXUnit();
|
|
|
|
}));
|
|
|
|
Assert.NotEmpty(mockAdafruitShop.Search("raspberry pi", new Filters()).ToEnumerable());
|
2021-08-05 06:22:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|