public void IfTwoNickelsAreInsertedNickleCountEqualsTwo() { MoneyMangerViewModel moneyMangerViewModel = new MoneyMangerViewModel(); moneyMangerViewModel.Insert(CoinWeight.Nickle, CoinDiameter.Nickle); moneyMangerViewModel.Insert(CoinWeight.Nickle, CoinDiameter.Nickle); Assert.AreEqual(2, moneyMangerViewModel.NickleCount); }
public void InsertingQuaterDimeAndNickleReturns40Cents() { MoneyMangerViewModel moneyMangerViewModel = new MoneyMangerViewModel(); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); moneyMangerViewModel.Insert(CoinWeight.Nickle, CoinDiameter.Nickle); moneyMangerViewModel.Insert(CoinWeight.Dime, CoinDiameter.Dime); Assert.AreEqual(0.40m, moneyMangerViewModel.CustomerAmountInserted); }
public void IfTwoDimesAreInsertedDimeCountEqualsTwo() { MoneyMangerViewModel moneyMangerViewModel = new MoneyMangerViewModel(); moneyMangerViewModel.Insert(CoinWeight.Dime, CoinDiameter.Dime); moneyMangerViewModel.Insert(CoinWeight.Dime, CoinDiameter.Dime); Assert.AreEqual(2, moneyMangerViewModel.DimeCount); }
public void IfTwoQuatersAreInsertedQuaterCountEqualsTwo() { MoneyMangerViewModel moneyMangerViewModel = new MoneyMangerViewModel(); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); Assert.AreEqual(2, moneyMangerViewModel.QuaterCount); }
public void IsInsertedValueEqualToOrGreaterSelectedItemPriceShouldReturnTrue() { MoneyMangerViewModel moneyMangerViewModel = new MoneyMangerViewModel(); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); moneyMangerViewModel.SelectedItemsPrice(1.00m); Assert.AreEqual(true, moneyMangerViewModel.IsInsertedValueGreaterThanOrEqualToSelectedItemsPrice()); }
public void TranactionReturnsChange() { MoneyMangerViewModel moneyMangerViewModel = new MoneyMangerViewModel(); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); moneyMangerViewModel.SelectedItemsPrice(1.00m); moneyMangerViewModel.Tranaction(); Assert.AreEqual(0.25m, moneyMangerViewModel.CustomerChangeToReturn); }
public void InsertingQuaterWeightAndDiameterReturns25Cents() { MoneyMangerViewModel moneyMangerViewModel = new MoneyMangerViewModel(); moneyMangerViewModel.Insert(CoinWeight.Quarter, CoinDiameter.Quarter); Assert.AreEqual(0.25m, moneyMangerViewModel.CustomerAmountInserted); }
public void InsertingNickelWeightAndDiameterReturns5Cents() { MoneyMangerViewModel moneyMangerViewModel = new MoneyMangerViewModel(); moneyMangerViewModel.Insert(CoinWeight.Nickle, CoinDiameter.Nickle); Assert.AreEqual(0.05m, moneyMangerViewModel.CustomerAmountInserted); }
public void InsertingDimeWeightAndDiameterReturns10Cents() { MoneyMangerViewModel moneyMangerViewModel = new MoneyMangerViewModel(); moneyMangerViewModel.Insert(CoinWeight.Dime, CoinDiameter.Dime); Assert.AreEqual(0.10m, moneyMangerViewModel.CustomerAmountInserted); }
public void IfBadCoinIsInsertedBadCoinCountEqualsOne() { MoneyMangerViewModel moneyMangerViewModel = new MoneyMangerViewModel(); moneyMangerViewModel.Insert(CoinWeight.BadCoin, CoinDiameter.BadCoin); Assert.AreEqual(1, moneyMangerViewModel.BadCoinCount); }