Esempio n. 1
0
 public void TestTakeZeroFunds()
 {
     double balance = 12000;
     double takeMoney = 1500;
     Account acc = new Account(balance);
     Assert.AreEqual(false, acc.takeFunds(takeMoney), "Wrong takeFunds");
 }
Esempio n. 2
0
 public void TestTakeZeroMoney()
 {
     double balance = 0;
     double takeMoney = 1500;
     Account acc = new Account(balance);
     Assert.AreEqual(0, acc.takeMoney(takeMoney), "Wrong takeMoney");
 }
Esempio n. 3
0
 public void TestInvestFundZero()
 {
     double balance = 0;
     double plusMoney = 1500;
     Account acc = new Account(balance);
     Assert.AreEqual(false, acc.investFunds(plusMoney), "Wrong addMoney");
 }
Esempio n. 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");
 }
Esempio n. 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);
 }
Esempio n. 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");
 }
Esempio n. 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");
 }
Esempio n. 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");
 }
Esempio n. 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");
 }
Esempio n. 10
0
 public bool removeAccount(Account acc)
 {
     if (accounts.Remove(acc)) return true;
     else return false;
 }
Esempio n. 11
0
 public void addAccount(Account acc)
 {
     accounts.Add(acc);
 }