public SellingTests() { builder = new StudentOfficeBuilder(); sut = builder.office; john = builder.john; jane = builder.jane; sut.SellProduct(john, new Order(ProductGenerator.chips, 5)); sut.SellProduct(jane, new Order(ProductGenerator.chips, 3)); }
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 AddingTransactions() { office.SellProduct(john, new Order(ProductGenerator.chips, 5)); Assert.Single(office.TransactionsList); }