Example #1
0
 public void TestTakeZeroFunds()
 {
     double balance = 12000;
     double takeMoney = 1500;
     Account acc = new Account(balance);
     Assert.AreEqual(false, acc.takeFunds(takeMoney), "Wrong takeFunds");
 }
Example #2
0
 public void TestTakeZeroMoney()
 {
     double balance = 0;
     double takeMoney = 1500;
     Account acc = new Account(balance);
     Assert.AreEqual(0, acc.takeMoney(takeMoney), "Wrong takeMoney");
 }
Example #3
0
 public void TestInvestFundZero()
 {
     double balance = 0;
     double plusMoney = 1500;
     Account acc = new Account(balance);
     Assert.AreEqual(false, acc.investFunds(plusMoney), "Wrong addMoney");
 }
Example #4
0
 public void TestTakeFunds()
 {
     double balance = 12000;
     double takeFunds = 3000;
     Account acc = new Account(balance);
     acc.takeFunds(takeFunds);
     Assert.AreEqual(balance, acc.getBalance(), "Wrong takeFunds");
 }
Example #5
0
 public Client(string login, string password, Account account)
 {
     this.login = login;
     this.password = password;
     status = false;
     this.accounts = new List<Account>();
     this.accounts.Add(account);
 }
Example #6
0
 public void TestTakeMoney()
 {
     double balance = 12000;
     double minusMoney = 1000;
     Account acc = new Account(balance);
     acc.takeMoney(minusMoney);
     balance -= minusMoney;
     Assert.AreEqual(balance, acc.getBalance(), "Wrong takeMoney");
 }
Example #7
0
 public void TestInvestFunds()
 {
     double balance = 12000;
     double investFunds = 3000;
     Account acc = new Account(balance);
     acc.investFunds(investFunds);
     balance -= investFunds;
     Assert.AreEqual(balance, acc.getBalance(), "Wrong investFunds");
 }
Example #8
0
 public void TestAddMoney()
 {
     double balance = 12000;
     double plusMoney = 1500;
     Account acc = new Account(balance);
     acc.addMoney(plusMoney);
     balance+=plusMoney;
     Assert.AreEqual(balance, acc.getBalance(), "Wrong addMoney");
 }
Example #9
0
 public void TestATMLogInOff()
 {
     Account acc = new Account();
     string login = "******";
     string pass = "******";
     Client cl = new Client(login, pass, acc);
     ATM atm = new ATM();
     atm.addClient(cl);
     int n = atm.logIn(login, pass);
     Assert.AreEqual(0, n, "Error find client");
     Assert.AreEqual(true, atm.logOff(login), "Error logOff");
 }
Example #10
0
 public bool removeAccount(Account acc)
 {
     if (accounts.Remove(acc)) return true;
     else return false;
 }
Example #11
0
 public void addAccount(Account acc)
 {
     accounts.Add(acc);
 }