public void SimpleBankingAppTest_BuildBankWithAccounts_AccountCreatedWithoutOwner() { //Arrange //Build Bank Bank testBank = BuildBank(); BuildBankAccountList(ref testBank); //Output Debug.SetMethodName(MethodBase.GetCurrentMethod().Name.ToString()); //Act //All default constructors are inaccessible AccountOwner owner1 = new AccountOwner(Guid.NewGuid().ToString(), "Washington", "George"); //acct.Checking acctcx1 = new acct.Checking(); acct.Checking acctcx2 = new acct.Checking("0000000001cx", Guid.NewGuid().ToString(), "Washington", "George", 1.00m); acct.Checking acctcx3 = new acct.Checking(Guid.NewGuid().ToString(), owner1, 1.00m); //All default constructors are inaccessible //acct.CorporateInvestment acctci1 = new acct.CorporateInvestment(); acct.CorporateInvestment acctci2 = new acct.CorporateInvestment(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), "Washington", "George", 1.00m); acct.CorporateInvestment acctci3 = new acct.CorporateInvestment(Guid.NewGuid().ToString(), owner1, 1.00m); //All default constructors are inaccessible //acct.IndividualInvestment acctii1 = new acct.IndividualInvestment(); acct.IndividualInvestment acctii2 = new acct.IndividualInvestment(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), "Washington", "George", 1.00m); acct.IndividualInvestment acctii3 = new acct.IndividualInvestment(Guid.NewGuid().ToString(), owner1, 1.00m); //Output Debug.WriteLine(owner1.ToString()); Debug.WriteLine(acctcx2.ToString()); Debug.WriteLine(acctcx3.ToString()); Debug.WriteLine(acctci2.ToString()); Debug.WriteLine(acctci3.ToString()); Debug.WriteLine(acctii2.ToString()); Debug.WriteLine(acctii3.ToString()); //Assert //All accounts are succesfully built, resulting in a true assertion Assert.IsTrue(true); }
public AccountsList BuildAccountsList(String bankId) { AccountsList accountsList = new AccountsList(bankId); AccountOwner owner1 = new AccountOwner(Guid.NewGuid().ToString(), "Washington", "George"); AccountOwner owner2 = new AccountOwner(Guid.NewGuid().ToString(), "Jefferson", "Thomas"); AccountOwner owner3 = new AccountOwner(Guid.NewGuid().ToString(), "Lincoln", "Abraham"); AccountOwner owner4 = new AccountOwner(Guid.NewGuid().ToString(), "Hamilton", "Alexander"); AccountOwner owner5 = new AccountOwner(Guid.NewGuid().ToString(), "Jackson", "Andrew"); AccountOwner owner6 = new AccountOwner(Guid.NewGuid().ToString(), "Grant", "Ulysses"); AccountOwner owner7 = new AccountOwner(Guid.NewGuid().ToString(), "Franklin", "Benjamin"); AccountOwner owner8 = new AccountOwner(Guid.NewGuid().ToString(), "McKinley", "William"); AccountOwner owner9 = new AccountOwner(Guid.NewGuid().ToString(), "Cleveland", "Grover"); AccountOwner owner10 = new AccountOwner(Guid.NewGuid().ToString(), "Chase", "Salmon"); AccountOwner owner11 = new AccountOwner(Guid.NewGuid().ToString(), "Wilson", "Woodrow"); //String accountNumber, String ownerId, String lastName, String firstName, decimal balance //String accountNumber, AccountOwner owner, decimal balance IAccount account1 = new acct.Checking("0000000001cx", owner1, 1.00m); IAccount account2 = new acct.Checking("0000000002cx", owner2, 2.00m); IAccount account3 = new acct.Checking("0000000003cx", owner3, 5.00m); IAccount account4 = new acct.Checking("0000000004cx", owner4, 10.00m); IAccount account5 = new acct.Checking("0000000005cx", owner5, 20.00m); IAccount account6 = new acct.Checking("0000000006cx", owner6, 50.00m); IAccount account7 = new acct.Checking("0000000007cx", owner7, 100.00m); IAccount account8 = new acct.Checking("0000000008cx", owner8, 500.00m); IAccount account9 = new acct.Checking("0000000009cx", owner9, 1000.00m); IAccount account10 = new acct.Checking("0000000010cx", owner10, 10000.00m); IAccount account11 = new acct.Checking("0000000011cx", owner11, 100000.00m); IAccount account1ci = new acct.CorporateInvestment("0000000001ci", owner1, 1.00m); IAccount account2ci = new acct.CorporateInvestment("0000000002ci", owner2, 2.00m); IAccount account3ci = new acct.CorporateInvestment("0000000003ci", owner3, 5.00m); IAccount account4ci = new acct.CorporateInvestment("0000000004ci", owner4, 10.00m); IAccount account5ci = new acct.CorporateInvestment("0000000005ci", owner5, 20.00m); IAccount account6ci = new acct.CorporateInvestment("0000000006ci", owner6, 50.00m); IAccount account7ci = new acct.CorporateInvestment("0000000007ci", owner7, 100.00m); IAccount account8ci = new acct.CorporateInvestment("0000000008ci", owner8, 500.00m); IAccount account9ci = new acct.CorporateInvestment("0000000009ci", owner9, 1000.00m); IAccount account10ci = new acct.CorporateInvestment("0000000010ci", owner10, 10000.00m); IAccount account11ci = new acct.CorporateInvestment("0000000011ci", owner11, 100000.00m); IAccount account1ii = new acct.IndividualInvestment("0000000001ii", owner1, 1.00m); IAccount account2ii = new acct.IndividualInvestment("0000000002ii", owner2, 2.00m); IAccount account3ii = new acct.IndividualInvestment("0000000003ii", owner3, 5.00m); IAccount account4ii = new acct.IndividualInvestment("0000000004ii", owner4, 10.00m); IAccount account5ii = new acct.IndividualInvestment("0000000005ii", owner5, 20.00m); IAccount account6ii = new acct.IndividualInvestment("0000000006ii", owner6, 50.00m); IAccount account7ii = new acct.IndividualInvestment("0000000007ii", owner7, 100.00m); IAccount account8ii = new acct.IndividualInvestment("0000000008ii", owner8, 500.00m); IAccount account9ii = new acct.IndividualInvestment("0000000009ii", owner9, 1000.00m); IAccount account10ii = new acct.IndividualInvestment("0000000010ii", owner10, 10000.00m); IAccount account11ii = new acct.IndividualInvestment("0000000011ii", owner11, 100000.00m); accountsList.Add(account1); accountsList.Add(account2); accountsList.Add(account3); accountsList.Add(account4); accountsList.Add(account5); accountsList.Add(account6); accountsList.Add(account7); accountsList.Add(account8); accountsList.Add(account9); accountsList.Add(account10); accountsList.Add(account11); accountsList.Add(account1ci); accountsList.Add(account2ci); accountsList.Add(account3ci); accountsList.Add(account4ci); accountsList.Add(account5ci); accountsList.Add(account6ci); accountsList.Add(account7ci); accountsList.Add(account8ci); accountsList.Add(account9ci); accountsList.Add(account10ci); accountsList.Add(account11ci); accountsList.Add(account1ii); accountsList.Add(account2ii); accountsList.Add(account3ii); accountsList.Add(account4ii); accountsList.Add(account5ii); accountsList.Add(account6ii); accountsList.Add(account7ii); accountsList.Add(account8ii); accountsList.Add(account9ii); accountsList.Add(account10ii); accountsList.Add(account11ii); return(accountsList); }