public void BankAccountTest() { var account = new BankAccountActor(); account.Deposit(10); Assert.IsFalse(account.Withdrawl(20).Result); Assert.AreEqual(10, account.GetBallance().Result); account.Deposit(10); account.Deposit(10); account.Deposit(10); Assert.IsTrue(account.Withdrawl(40).Result); Assert.AreEqual(0, account.GetBallance().Result); }
public void BankAccountTransferTest() { var accountA = new BankAccountActor(); var accountB = new BankAccountActor(); accountA.Deposit(100); accountA.Transfer(25, accountB); Assert.AreEqual(75, accountA.GetBallance().Result); Assert.AreEqual(25, accountB.GetBallance().Result); }