コード例 #1
0
        public void should_not_withdraw_from_ATM_when_amount_greater_than_200()
        {
            MockBankAccount account = new MockBankAccount();
            AtmDecorator atm = new AtmDecorator(account);

            atm.Withdraw(250);
        }
コード例 #2
0
        public void should_withdraw_from_ATM_when_amount_less_than_200()
        {
            MockBankAccount account = new MockBankAccount();
            AtmDecorator atm = new AtmDecorator(account);

            atm.Withdraw(150);

            Assert.That(account.AmountWithdrawn, Is.EqualTo(150));
        }