public async Task OnlySameCategory() { var product = await TestSubject.GetAsync(1); var results = (await TestSubject.GetSuggestionsAsync(product, Products.SellMode.Downsell)).ToList(); Assert.IsTrue(results.All(_ => _.Category == product.Category)); }
public async Task ExcludeSameProduct() { var product = await TestSubject.GetAsync(3); var results = (await TestSubject.GetSuggestionsAsync(product, Products.SellMode.Downsell)).ToList(); Assert.IsTrue(results.All(_ => _.ProductID != product.ProductID)); }
public async Task DownsellsReturnLowerPricedProducts() { var product = await TestSubject.GetAsync(1); var results = (await TestSubject.GetSuggestionsAsync(product, Products.SellMode.Downsell)).ToList(); Assert.IsTrue(results.All(_ => _.Price <= product.Price)); }
public async Task OnlyReturnAvailable() { var product = await TestSubject.GetAsync(1); var results = (await TestSubject.GetSuggestionsAsync(product, Products.SellMode.Downsell)).ToList(); Assert.IsTrue(results.All(_ => _.Available)); }
public async Task SuggestionsOnlyReturnLimitedResults() { var product = await TestSubject.GetAsync(1); var results = (await TestSubject.GetSuggestionsAsync(product, Products.SellMode.Downsell)).ToList(); Assert.AreEqual(3, results.Count); }