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