public async Task RequestItemByMerchantSku() { var latestSku = await itemApi.GetAllItems(1,10); Assert.IsType<ItemResponses>(latestSku); Assert.True(latestSku.ItemResponse.Count == 1); var oneSku = await itemApi.GetItem(latestSku.ItemResponse[0].Sku); Assert.IsType<ItemResponse>(oneSku); Assert.True(latestSku.ItemResponse.Count == 1); Assert.Equal(latestSku.ItemResponse[0].Sku, oneSku.Sku); Assert.Equal(latestSku.ItemResponse[0].Price.Amount, oneSku.Price.Amount); Assert.Equal(latestSku.ItemResponse[0].ProductName, oneSku.ProductName); }
public async Task RequestItemByMerchantSku() { ItemViewList latestSku = await itemApi.GetAllItems(1); Assert.IsType <ItemViewList>(latestSku); Assert.True(latestSku.Items.Count == 1); ItemView oneSku = await itemApi.GetItem(latestSku.Items[0].Sku); Assert.IsType <ItemView>(oneSku); Assert.Equal(latestSku.Items[0].Sku, oneSku.Sku); Assert.Equal(latestSku.Items[0].Price.Amount, oneSku.Price.Amount); Assert.Equal(latestSku.Items[0].ProductName, oneSku.ProductName); }
public async Task GetOneSpecificItem() { var result = await itemApi.GetItem("test"); Assert.IsType <ItemView>(result); Assert.True(result.Sku.Length > 0); Assert.True(result.ProductName.Length > 0); Assert.True(result.Gtin.Length > 0); }