Esempio n. 1
0
        public void EmptySetsQuantityToZero()
        {
            VendingMachineViewModel vendingMachineViewModel = new VendingMachineViewModel();

            vendingMachineViewModel.Refill();
            vendingMachineViewModel.Empty();

            Assert.Multiple(() =>
            {
                Assert.AreEqual(0, vendingMachineViewModel.Items[0].Quantity);
                Assert.AreEqual(0, vendingMachineViewModel.Items[1].Quantity);
                Assert.AreEqual(0, vendingMachineViewModel.Items[2].Quantity);
                Assert.AreEqual(0, vendingMachineViewModel.Items[3].Quantity);
            });
        }