示例#1
0
        public void TestDepositingInBankAccount()
        {
            BancAccount bancAccount = new BancAccount();

            bancAccount.Deposit(100);

            Assert.That <int>(100, Is.EqualTo(bancAccount.Amount));
        }
示例#2
0
        public void TestWithdrawingInBankAccount()
        {
            BancAccount bancAccount = new BancAccount();

            bancAccount.Deposit(100);
            bancAccount.WithDraw(60);
            Assert.AreEqual(40, bancAccount.Amount);

            bancAccount.WithDraw(60);

            Assert.AreEqual(0, bancAccount.Amount);
        }