public void ShouldPrintCorrectCustomerBalance() { SodaMachine machine = new SodaMachine(10); SodaMachineUi machineUi = new SodaMachineUi(machine); machine.DepositCustomerMoney(2.25); string result = machineUi.PerformAction(MainMenu.Commands.PrintCustomerBalance.Command).ToString(); Assert.IsTrue(result.Contains("2.25"), string.Format("Result should contain 2.25, actual result was {0}", result)); }
public void ShouldBeAbleToSelectAnItem() { machine.DepositCustomerMoney(2); ui.PerformAction(MainMenu.Commands.ChooseItem.Command + " 1"); Assert.AreEqual(9, machine.Slots[0].Quantity); }