public void testShouldPutCustomersAccountInTemplateParameters() { bank.openAccount(new AccountApplicationBuilder(bank).customer(customer).build()); Set<Account> accounts = customer.getAccounts(); requestParams.put("fromCustomer", ben.toString()); requestParams.put("toCustomer", customer.getNickName().toString()); requestParams.put("toAccounts", accounts.toString()); Map<String, Object> templateParams = view.process(requestParams); assertEquals(accounts.toString(), templateParams.get("toAccounts").toString()); }
@Before public void setUp() throws Exception { SEK = new Currency("SEK", 0.15); SweBank = new Bank("SweBank", SEK); SweBank.openAccount("Alice"); testAccount = new Account("Hans", SEK); testAccount.deposit(new Money(10000000, SEK)); SweBank.deposit("Alice", new Money(1000000, SEK)); }