コード例 #1
0
ファイル: Account_test.py プロジェクト: jkeung/Banking_App
    def test_deposit_negative(self):
        test_account1 = Account(100, 1000000)

        self.assertEquals(test_account1.deposit(-50), None)
コード例 #2
0
ファイル: Account_test.py プロジェクト: jkeung/Banking_App
    def test_deposit_string(self):
        test_account1 = Account(100, 1000000)

        with self.assertRaises(TypeError):
            test_account1.deposit('hello')
コード例 #3
0
ファイル: Account_test.py プロジェクト: jkeung/Banking_App
    def test_withdraw_negative(self):
        test_account1 = Account(100, 1000000)

        self.assertEquals(test_account1.withdraw(-100), None)
コード例 #4
0
ファイル: Account_test.py プロジェクト: jkeung/Banking_App
    def test_withdraw_string(self):
        test_account1 = Account(100, 1000000)

        with self.assertRaises(TypeError):
            test_account1.withdraw('hello')
コード例 #5
0
ファイル: Account_test.py プロジェクト: jkeung/Banking_App
    def test_deposit_no_amount(self):
        test_account1 = Account(100, 1000000)

        with self.assertRaises(TypeError):
            test_account1.deposit()
コード例 #6
0
ファイル: Account_test.py プロジェクト: jkeung/Banking_App
    def test_withdraw_no_amount(self):
        test_account1 = Account(100, 1000000)

        with self.assertRaises(TypeError):
            test_account1.withdraw()
コード例 #7
0
ファイル: Account_test.py プロジェクト: jkeung/Banking_App
    def test_deposit(self):
        test_account1 = Account(100, 1000000)
        test_account1.deposit(100)

        self.assertEquals(test_account1.balance, 200)
コード例 #8
0
ファイル: Account_test.py プロジェクト: jkeung/Banking_App
    def test_withdraw(self):
        test_account1 = Account(100, 1000000)
        test_account1.withdraw(50)

        self.assertEquals(test_account1.balance, 45)