Пример #1
0
 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));
 }
Пример #2
0
        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"));
        }
Пример #3
0
        public void AddingTransactions()
        {
            office.SellProduct(john, new Order(ProductGenerator.chips, 5));

            Assert.Single(office.TransactionsList);
        }