def testWithdrawalTransactionType(self): account = BankAccount(1) account.balance = 10 account.withdraw(5) self.assertIsInstance(account.transactions[0],Transaction)
def testWithdrawalTransaction(self): account = BankAccount(1) account.balance = 10 account.withdraw(5) self.assertEqual(len(account.transactions),1)
def testDecimalWithdraw(self): account = BankAccount(1) account.balance = 10 account.withdraw(0.50) self.assertEqual(account.balance,9.50)
def testSmallWithdraw(self): account = BankAccount(1) account.balance = 10 account.withdraw(0.001) self.assertEqual(account.balance,9.999)
def testIntegerWithdraw(self): account = BankAccount(1) account.balance = 10 account.withdraw(5) self.assertEqual(account.balance,5)