예제 #1
0
        public void test02DepositIncreasesBalanceOnTransactionValue()
        {
            ReceptiveAccount account = new ReceptiveAccount();

            Deposit.registerForOn(100, account);

            Assert.AreEqual(100.0, account.balance());
        }
예제 #2
0
        public void test03WithdrawDecreasesBalanceOnTransactionValue()
        {
            ReceptiveAccount account = new ReceptiveAccount();

            Deposit.registerForOn(100, account);
            Withdraw.registerForOn(-50, account);

            Assert.AreEqual(50.0, account.balance());
        }
예제 #3
0
        public void test01ReceptiveAccountHaveZeroAsBalanceWhenCreated()
        {
            ReceptiveAccount account = new ReceptiveAccount();

            Assert.AreEqual(0.0, account.balance());
        }