public void PremiumAccountDepositRuleTest(string accountNumber, string name, decimal balance, AccountType accountType, decimal amount, bool expectedResult) { IDeposit deposit = new NoLimitDepositRule(); Account account = new Account() { AccountNumber = accountNumber, Balance = balance, Name = name, Type = accountType }; AccountDepositResponse response = deposit.Deposit(account, amount); Assert.AreEqual(response.Success, expectedResult); }
public void BasicAccountDepositRuleTest(string accountNumber, string name, decimal balance, AccountType accountType, decimal amount, bool expectedResult) { IDeposit deposit = new NoLimitDepositRule(); Account account = new Account() { AccountNumber = accountNumber, accountType = accountType, Balance = amount }; AccountDepositResponse response = deposit.Deposit(account, amount); Assert.AreEqual(expectedResult, response.Success); }
public void BasicAccountDepositRuleTest(string accountNumber, string name, decimal balance, AccountType accountType, decimal amount, bool expectedResult) { IDeposit depositRule = new NoLimitDepositRule(); Account account = new Account(); account.AccountNumber = accountNumber; account.Name = name; account.Balance = balance; account.Type = accountType; AccountDepositResponse response = depositRule.Deposit(account, amount); Assert.AreEqual(response.Success, expectedResult); }
public void BasicAccountDepositRuleTest(string accountNumber, string name, decimal balance, AccountType type, decimal amount, decimal newBalance, bool expected) { IDeposit deposit = new NoLimitDepositRule(); Account account = new Account() { AccountNumber = accountNumber, Name = name, Balance = balance, Type = type }; AccountDepositResponse response = deposit.Deposit(account, amount); Assert.AreEqual(expected, response.Success); Assert.AreEqual(newBalance, response.Account.Balance); }
public void PremiumAccountDepositRuleTest(string accountNumber, string name, decimal balance, AccountType accountType, decimal amount, bool expectedResult) { var rule = new NoLimitDepositRule(); var account = new Account() { AccountNumber = accountNumber, Name = name, Balance = balance, Type = accountType }; var response = rule.Deposit(account, amount); Assert.AreEqual(expectedResult, response.Success); }
public void PremiumAccountDepositRuleTest(string accountNumber, string name, decimal balance, AccountType accountType, decimal amount, bool expectedResult) { IDeposit depositVar = new NoLimitDepositRule(); Account accountVar = new Account(); accountVar.AccountNumber = accountNumber; accountVar.Name = name; accountVar.Balance = balance; accountVar.Type = accountType; AccountDepositResponse responseVar = depositVar.Deposit(accountVar, amount); Assert.AreEqual(expectedResult, responseVar.Success); }
public void PremiumAccountDepositRuleTest(string accountNumber, string name, decimal balance, AccountType accountType, decimal amount, bool expectedResult) { IDeposit ruke = new NoLimitDepositRule(); Account juke = new Account(); juke.AccountNumber = accountNumber; juke.Name = name; juke.Balance = balance; juke.Type = accountType; AccountDepositResponse adr = ruke.Deposit(juke, amount); Assert.AreEqual(expectedResult, adr.Success); }
public void PremiumAccountDepositRuleTest(string accountNumber, string name, decimal balance, AccountType accountType, decimal amount, bool expectedResult) { IDeposit deposit = new NoLimitDepositRule(); Account account = new Account(); account.AccountNumber = accountNumber; account.Name = name; account.Balance = balance; account.Type = accountType; AccountDepositResponse accountDeposit = deposit.Deposit(account, amount); Assert.That(accountDeposit.Success, Is.EqualTo(expectedResult)); }
public void PremiumAccountDepositRuleTest(string accountNumber, string name, decimal balance, AccountType accountType, decimal amount, decimal newBalance, bool expectedResult) { IDeposit deposit = new NoLimitDepositRule(); Account account = new Account(); account.AccountNumber = accountNumber; account.Balance = balance; account.Name = name; account.Type = accountType; AccountDepositResponse response = deposit.Deposit(account, amount); Assert.AreEqual(expectedResult, response.Success); Assert.AreEqual(account.Balance, newBalance);//testing expected balance accuracy }
public void BasicAccountDepositTest(string accountNumber, string name, decimal balance, AccountType accountType, decimal amount, bool expectedResult) { IDeposit basicDeposit = new NoLimitDepositRule(); Account account = new Account() { AccountNumber = accountNumber, Name = name, Balance = balance, Type = accountType }; AccountDepositResponse result = basicDeposit.Deposit(account, amount); var actual = result.Success; Assert.AreEqual(expectedResult, actual); }
public void FreeAccountDepositRuleTest(string acctNum, string name, decimal balance, AccountType accountType, decimal amount, bool expectedResult) { IDeposit RuleTest = new NoLimitDepositRule(); Account acct = new Account() { AccountNumber = acctNum, Name = name, Balance = balance, Type = accountType }; AccountDepositResponse response = RuleTest.Deposit(acct, amount); bool actual = response.Success; Assert.AreEqual(expectedResult, actual); }
public void BasicAccountDepositRuleTest(string accountNumber, string name, decimal balance, AccountType accountType, decimal amount, decimal expectedBalance, bool expectedResult) { IDeposit depositResponse = new NoLimitDepositRule(); Account accountVariable = new Account() { AccountNumber = accountNumber, Name = name, Balance = balance, Type = accountType }; AccountDepositResponse accountDepositResponse = depositResponse.Deposit(accountVariable, amount); Assert.AreEqual(expectedResult, accountDepositResponse.Success); Assert.AreEqual(expectedBalance, accountDepositResponse.Account.Balance); }
public static void CorrectAmountDepositedWithdrawPremium(string accountNumber) { //after this files are in arraylist FileAccountRepository TestFileRepo = new FileAccountRepository("C:/Users/Jeremy/source/repos/SGBank052020/SGBank.Data/AccountsForTestingDeposit.txt"); Account a = TestFileRepo.LoadAccount(accountNumber); decimal beginningBalance = a.Balance; //100 IDeposit deposit = new NoLimitDepositRule(); deposit.Deposit(a, 10); //stores new balance in account TestFileRepo.SaveAccount(a); Assert.AreEqual(a.Balance, 110); IWithdraw withdraw = new PremiumAccountWithdrawRule(); withdraw.Withdraw(a, -10); TestFileRepo.SaveAccount(a); Assert.AreEqual(a.Balance, 100); }
[TestCase("44444", "Premium Account", 100, AccountType.Premium, 250, true)] //success //what will this test do public void PremiumAccountDepositRuleTest(string accountNumber, string name, decimal balance, AccountType accountType, decimal amount, bool expectedResult) { //IDeposit contains: accountdeposit response -- //AccountDepositResponse contains: Account object, Amount, Old Balance //Account object contains: Name, Account Number, Balance, and Type //Response Oject(General) Success: bool, Message: string //NoLimitDepositRule contains: returns response object, sets success annd Message based on ////condition/rule IDeposit deposit = new NoLimitDepositRule();//Ideposit - contains accountdeposit resp[onse Account account = new Account(); account.Name = name; account.AccountNumber = accountNumber; account.Balance = balance; account.Type = accountType; //takes in locat account var and amount param AccountDepositResponse response = deposit.Deposit(account, amount); Assert.AreEqual(expectedResult, response.Success); }
public void BasicAccountDepositTest(string accountNumber, string name, decimal balance, AccountType accountType, decimal amount, decimal newBalance, bool expectedResult) { IDeposit deposit = new NoLimitDepositRule(); Account account = new Account(); account.Name = name; account.Balance = balance; account.Type = accountType; account.AccountNumber = accountNumber; AccountDepositResponse response = deposit.Deposit(account, amount); Assert.AreEqual(expectedResult, response.Success); if (response.Success) { Assert.AreEqual(newBalance, response.Account.Balance); } else { Assert.AreEqual(balance, account.Balance); } }