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)); }
private double investmentEarnings(ReceptiveAccount account) { return(account.transactions().Sum(transaction => transaction.AfectInvestmentEarningBy())); }
private double accountTransferNet(ReceptiveAccount account) { return(account.transactions().Sum(transaction => transaction.AfectNetBy())); }
private List <String> accountSummaryLines(ReceptiveAccount fromAccount) { return(fromAccount.transactions().Select(account => account.Description()).ToList()); }