public void ContainsMethodReturnsProductIfExists(string label) { var product = new Product(label, 1.2m, 1); var otherProduct = new Product("other", 2.2m, 2); productStock.Add(product); productStock.Add(otherProduct); Assert.That(productStock.Contains(product)); }
public void ProductStock_ContainsMethodReturnsFalse(string name, decimal price, int quantity) { var stock = new ProductStock(); stock.Add(new Product(name, price, quantity)); Assert.IsFalse(stock.Contains(new Product("GPU", 12.4m, 3))); }
public void Contains_NonExistingProductShouldReturnFalse() { Assert.IsFalse(productStock.Contains(product)); }