Example #1
0
        public void Insert3DimeMethodAdds30CentsToAmountInserted()
        {
            VendingMachineViewModel vendingMachineViewModel = new VendingMachineViewModel();

            vendingMachineViewModel.InsertDime();
            vendingMachineViewModel.InsertDime();
            vendingMachineViewModel.InsertDime();
            Assert.AreEqual(0.30m, vendingMachineViewModel.MoneyInMachine.CustomerAmountInserted);
        }
Example #2
0
        public void ReturnChangeMovesMoneyFromInsertedToChangeReturned()
        {
            VendingMachineViewModel vendingMachineViewModel = new VendingMachineViewModel();

            vendingMachineViewModel.InsertDime();
            vendingMachineViewModel.InsertDime();
            vendingMachineViewModel.InsertDime();
            vendingMachineViewModel.ReturnChange();
            Assert.AreEqual(0.30m, vendingMachineViewModel.MoneyInMachine.CustomerChangeToReturn);
        }
 private void OnClick_InsertDime(object sender, RoutedEventArgs e)
 {
     _rickAndMortysVendingMachine.InsertDime();
 }