public ProgramUI(IConsole consoleForAllReadsAndWrites) { _console = consoleForAllReadsAndWrites; BankService = new BankService(); SavingsRepo = new SavingsRepo(); CheckingRepo = new CheckingRepo(); }
public void SavingsAccount_CreateAdditionalSavingsAccountMethod_ShouldSucceed() { //arrange var newSavingsAccount = new SavingsRepo(); //act var expected = 1000m; var actual = newSavingsAccount.CreateSavingsAccount("Jeffries", 1000m, 123456); //assert Assert.AreEqual(expected, actual.Balance); }
public void SavingsAccount_CreateSavingsAccountMethodWithMinimumBalance_ShouldSucceed() { //arrange var newSavingsAccount = new SavingsRepo(); //act var expected = 300m; var actual = newSavingsAccount.CreateSavingsAccountWithMinimumBalance("Jeffries", 123456); //assert Assert.AreEqual(expected, actual.Balance); }
public void SavingsAccount_GetAllSavingsAccounts_ShouldSucceed() { //arrange var savingsAccount = new Savings("Jeffries", 20000m, 233456); var savingsAccount1 = new Savings("Sharp", 3000m, 123456); var savingsAccount2 = new Savings("Stewart", 4000m, 223456); var savingsRepo = new SavingsRepo(); savingsRepo.AddAccountToSavingsList(savingsAccount); savingsRepo.AddAccountToSavingsList(savingsAccount1); savingsRepo.AddAccountToSavingsList(savingsAccount2); //act var expected = 3; var actual = savingsRepo.GetAllSavingsAccounts().Count; //assert Assert.AreEqual(expected, actual); }
public void SavingsAccount_CreationOfSavingsAccountWithout300DollarWillThrowException_ShouldSucceed() { //arrange var newSavingsRepo = new SavingsRepo(); var savingsAccount = newSavingsRepo.CreateSavingsAccount("Jeffries", 200m, 123456); }