Exemple #1
0
 def test_total_zero_when_new_instance_made(self):
     new_cash_desk = CashDesk()
     self.assertEqual(0, new_cash_desk.total())
Exemple #2
0
 def test_can_withdraw_money_not_all_money(self):
     new_cash_desk = CashDesk()
     new_cash_desk.take_money({1: 2, 100: 3})
     self.assertTrue(new_cash_desk.can_withdraw_money(301))
Exemple #3
0
 def test_can_withdraw_money_cant_withdraw(self):
     new_cash_desk = CashDesk()
     new_cash_desk.take_money({1: 2, 100: 3})
     self.assertFalse(new_cash_desk.can_withdraw_money(105))
Exemple #4
0
 def test_total_after_money_take(self):
     new_cash_desk = CashDesk()
     new_cash_desk.take_money({1: 2, 100: 3})
     self.assertEqual(302, new_cash_desk.total())
 def test_total_zero_when_new_instance_made(self):
     new_cash_desk = CashDesk()
     self.assertEqual(0, new_cash_desk.total())
 def test_can_withdraw_money_cant_withdraw(self):
     new_cash_desk = CashDesk()
     new_cash_desk.take_money({1: 2, 100: 3})
     self.assertFalse(new_cash_desk.can_withdraw_money(105))
 def test_can_withdraw_money_not_all_money(self):
     new_cash_desk = CashDesk()
     new_cash_desk.take_money({1: 2, 100: 3})
     self.assertTrue(new_cash_desk.can_withdraw_money(301))
 def test_total_after_money_take(self):
     new_cash_desk = CashDesk()
     new_cash_desk.take_money({1: 2, 100: 3})
     self.assertEqual(302, new_cash_desk.total())