public void GetAllBankAccounts_Test() { //IRepository<IBankAccount, int> repository = new BankAccountRepository(); BankAccountController mgr = new BankAccountController(repository); ICustomer customer1 = new Customer(1, "Name", "Address", "Phone", "Email"); ICustomer customer2 = new Customer(2, "Name", "Address", "Phone", "Email"); IBankAccount account1 = mgr.CreateNewBankAccount(customer1); IBankAccount account2 = mgr.CreateNewBankAccount(customer2); IList <IBankAccount> returned = mgr.GetAllBankAccounts(); Assert.AreEqual(2, returned.Count); Assert.AreSame(account1, returned[0]); Assert.AreSame(account2, returned[1]); }