示例#1
0
        public void test06ReceptiveAccountsKnowsRegisteredTransactions()
        {
            ReceptiveAccount account  = new ReceptiveAccount();
            Deposit          deposit  = Deposit.registerForOn(100, account);
            Withdraw         withdraw = Withdraw.registerForOn(50, account);

            Assert.IsTrue(account.registers(deposit));
            Assert.IsTrue(account.registers(withdraw));
        }
示例#2
0
        public void test19bTransferShouldRegistersATransferWithdrawOnFromAccount()
        {
            ReceptiveAccount fromAccount = new ReceptiveAccount();
            ReceptiveAccount toAccount   = new ReceptiveAccount();

            Transfer transfer = Transfer.registerFor(100, fromAccount, toAccount);

            Assert.IsTrue(fromAccount.registers(transfer.withdrawLeg()));
        }
示例#3
0
        public void test19aTransferShouldRegistersATransferDepositOnToAccount()
        {
            ReceptiveAccount fromAccount = new ReceptiveAccount();
            ReceptiveAccount toAccount   = new ReceptiveAccount();

            Transfer transfer = Transfer.registerFor(100, fromAccount, toAccount);

            Assert.IsTrue(toAccount.registers(transfer.depositLeg()));
        }