21 lines
667 B
C#
21 lines
667 B
C#
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Props.Shop.Adafruit.Api;
|
|
using Xunit;
|
|
|
|
namespace Props.Shop.Adafruit.Tests.Api
|
|
{
|
|
public class SearchManagerTest
|
|
{
|
|
[Fact]
|
|
public void SearchTest()
|
|
{
|
|
FakeProductListingManager stubProductListingManager = new FakeProductListingManager();
|
|
SearchManager searchManager = new SearchManager(stubProductListingManager);
|
|
stubProductListingManager.RefreshProductListings();
|
|
searchManager.Similarity = 0.8f;
|
|
Assert.NotEmpty(searchManager.Search("Raspberry Pi").ToEnumerable());
|
|
searchManager.Dispose();
|
|
}
|
|
}
|
|
} |