public void StockChangeTest() { // 8 chips were bought, 50 were there at the start IStockData stock = (IStockData)sut.Stock; Assert.Equal(42, stock.GetProductQuantity("chips")); }
public void NotifyingTest() { // Test of the notifying : stock was at 42, 35 are sold, 40 are ordered IStockData stock = (IStockData)sut.Stock; sut.SellProduct(john, new Order(ProductGenerator.chips, 35)); Assert.Equal(47, stock.GetProductQuantity("chips")); }
public void OrderingIntoStockTest() { IStockBehaviour stock = office.Stock; Commercial commercial = office._commercial; stock.AddToStock(commercial.OrderedProduct("chips", 5)); IStockData stockData = (IStockData)stock; Assert.Equal(55, stockData.GetProductQuantity("chips")); }
public void GetTheRightQuantity() { Assert.Equal(50, sut.GetProductQuantity("chips")); }