public void MemberDataExample(string accNo, string accName, AccountType accType, Currencies accCurr) { BankSimulator simulator = new BankSimulator(); simulator.OpenAccount(accNo, accName, accType, accCurr); simulator.CloseAccount(accNo); }
public void FactTest() { BankSimulator simulator = new BankSimulator(); simulator.OpenAccount("1234567890", "Test Account1", AccountType.CustomerAccount, Currencies.ZAR); simulator.CloseAccount("1234567890"); //if the account is opened correctly we should be able to close it }
public void ThrowsAccountNotFoundTest() { BankSimulator simulator = new BankSimulator(); simulator.OpenAccount("1234567894", "Test Account1", AccountType.CustomerAccount, Currencies.ZAR); Assert.Throws <AccountNotFoundException>(() => simulator.Transfer("1234567894", "789456123", 100) ); }
public void ThrowsAccountExistsExceptionTest() { BankSimulator simulator = new BankSimulator(); simulator.OpenAccount("1234567899", "Test Account1", AccountType.CustomerAccount, Currencies.ZAR); Assert.Throws <AccountExistsException>(() => simulator.OpenAccount("1234567899", "Test Account1", AccountType.CustomerAccount, Currencies.ZAR) ); }
public void ThrowsInsuffientFundsExceptionTest() { BankSimulator simulator = new BankSimulator(); simulator.OpenAccount("1234567895", "Test Account1", AccountType.CustomerAccount, Currencies.ZAR); simulator.OpenAccount("1234567896", "Test Account1", AccountType.CustomerAccount, Currencies.ZAR); Assert.Throws <InsufficientFundsException>(testCode: () => simulator.Transfer("1234567895", "1234567896", 10000) ); }