示例#1
0
        public void test12AccountsKnowsItsTransactions()
        {
            ReceptiveAccount account1 = new ReceptiveAccount();

            Deposit deposit1 = Deposit.registerForOn(100, account1);

            Assert.AreEqual(1, account1.transactions().Count);
            Assert.IsTrue(account1.transactions().Contains(deposit1));
        }
示例#2
0
 private double investmentEarnings(ReceptiveAccount account)
 {
     return(account.transactions().Sum(transaction => transaction.AfectInvestmentEarningBy()));
 }
示例#3
0
 private double accountTransferNet(ReceptiveAccount account)
 {
     return(account.transactions().Sum(transaction => transaction.AfectNetBy()));
 }
示例#4
0
 private List <String> accountSummaryLines(ReceptiveAccount fromAccount)
 {
     return(fromAccount.transactions().Select(account => account.Description()).ToList());
 }