|
@ -13,6 +13,29 @@ void test_subtract_bet_10_from_balance_10() { |
|
|
//act |
|
|
//act |
|
|
int actualResult = subtractBetFromBalance(10, 10); |
|
|
int actualResult = subtractBetFromBalance(10, 10); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
|
|
|
} |
|
|
|
|
|
void test_subtract_bet_0_from_balance_10() { |
|
|
|
|
|
|
|
|
|
|
|
//arrange |
|
|
|
|
|
int expectedResult = 10; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
int actualResult = subtractBetFromBalance(0, 10); |
|
|
|
|
|
|
|
|
|
|
|
//assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_subtract_bet_5_from_balance_10() { |
|
|
|
|
|
|
|
|
|
|
|
//arrange |
|
|
|
|
|
int expectedResult = 5; |
|
|
|
|
|
|
|
|
|
|
|
//act |
|
|
|
|
|
int actualResult = subtractBetFromBalance(5, 10); |
|
|
|
|
|
|
|
|
//assert |
|
|
//assert |
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); |
|
|
} |
|
|
} |