Exemple #1
0
	def testDepositTransactionType(self):
		account = BankAccount(1)
		account.deposit(10)
		self.assertIsInstance(account.transactions[0],Transaction)
Exemple #2
0
	def testDepositTransaction(self):
		account = BankAccount(1)
		account.deposit(10)
		self.assertEqual(len(account.transactions),1)
Exemple #3
0
	def testSmallDeposit(self):
		account = BankAccount(1)
		account.balance = 10
		account.deposit(0.001)
		self.assertEqual(account.balance,10.001)
Exemple #4
0
	def testLargeDeposit(self):
		account = BankAccount(1)
		account.balance = 10
		account.deposit(2147483650)
		self.assertEqual(account.balance,2147483660)
Exemple #5
0
	def testDecimalDeposit(self):
		account = BankAccount(1)
		account.balance = 10
		account.deposit(0.50)
		self.assertEqual(account.balance,10.50)
Exemple #6
0
	def testIntegerDeposit(self):
		account = BankAccount(1)
		account.balance = 10
		account.deposit(10)
		self.assertEqual(account.balance,20)