Ejemplo n.º 1
0
 public void TestWithdrawAndDeposit()
 {
     BankAccount myAccount = new BankAccount("13-31-23232", "1229292KA", 101);
     myAccount.Deposit(300);
     myAccount.Deposit(300);
     myAccount.Withdraw(800);
     Assert.AreEqual(-100, myAccount.Balance);
 }
Ejemplo n.º 2
0
 public void TestCollection()
 {
     BankAccount myAccount = new BankAccount("13", "asss");
     myAccount.Deposit(100);
     myAccount.Deposit(300);
     List<double> transaction = new List<double>() { 100, 300, -375 };
     myAccount.Withdraw(375);
     CollectionAssert.AreEqual(transaction, myAccount.Transactions);
     Assert.AreEqual(25, myAccount.Balance);
 }
Ejemplo n.º 3
0
 static void Main()
 {
     BankAccount myaccount = new BankAccount("1322", "adsd22", 1000);
     myaccount.Deposit(3000);
     myaccount.Deposit(3000);
     myaccount.Withdraw(6500);
     Console.WriteLine(myaccount.ToString());
     myaccount.Withdraw(1200);
     Console.ReadLine();
 }