Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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)));
        }
Exemplo n.º 3
0
 public void Contains_NonExistingProductShouldReturnFalse()
 {
     Assert.IsFalse(productStock.Contains(product));
 }