2021-07-20 22:51:43 +00:00
|
|
|
using System;
|
|
|
|
using System.IO;
|
|
|
|
using Props.Shop.Adafruit.Api;
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
namespace Props.Shop.Adafruit.Tests
|
|
|
|
{
|
|
|
|
public class ListingParserTest
|
|
|
|
{
|
|
|
|
[Fact]
|
|
|
|
public void TestParsing()
|
|
|
|
{
|
2021-08-05 06:22:19 +00:00
|
|
|
ProductListingsParser mockParser = new ProductListingsParser();
|
|
|
|
using (Stream stream = File.OpenRead("./Assets/products.json"))
|
|
|
|
{
|
|
|
|
mockParser.BuildProductListings(stream);
|
|
|
|
}
|
2021-07-20 22:51:43 +00:00
|
|
|
Assert.NotEmpty(mockParser.ProductListings);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|