示例#1
0
        public void Cannot_Be_Initialized_With_Negative_Quantity()
        {
            InvalidOperationException ex = Assert.Throws <InvalidOperationException>(() =>
            {
                var money = new Model.Money(0, 1, -1, 1);
            });

            Assert.That(ex.Message, Is.EqualTo("Money can't be initialized with negative counts"));
        }
示例#2
0
 public void Money_Displays_Correctly(int fiveCentCount, int tenCentCount, int oneDollarCount, int fiveDollarCount, string result)
 {
     Model.Money money = new Model.Money(fiveCentCount, tenCentCount, oneDollarCount, fiveDollarCount);
     Assert.That(money.ToString(), Is.EqualTo(result));
 }
 protected void InsertMoney(Model.Money coinOrNote)
 {
     _snackMachine.InsertMoney(coinOrNote);
     NotifyPropertyChanged(nameof(MoneyInTransaction));
 }