20 lines
639 B
C#
20 lines
639 B
C#
|
using System.Threading.Tasks;
|
||
|
using Props.Shop.Adafruit.Api;
|
||
|
using Xunit;
|
||
|
|
||
|
namespace Props.Shop.Adafruit.Tests.Api
|
||
|
{
|
||
|
public class SearchManagerTest
|
||
|
{
|
||
|
[Fact]
|
||
|
public async Task SearchTest()
|
||
|
{
|
||
|
FakeProductListingManager stubProductListingManager = new FakeProductListingManager();
|
||
|
SearchManager searchManager = new SearchManager(stubProductListingManager);
|
||
|
await stubProductListingManager.DownloadListings();
|
||
|
searchManager.Similarity = 0.8f;
|
||
|
Assert.NotEmpty(searchManager.Search("Raspberry Pi"));
|
||
|
searchManager.Dispose();
|
||
|
}
|
||
|
}
|
||
|
}
|