Browse Source

weitere Tests zur Berechnung Guthaben

remotes/origin/stefan
fdai7472 11 months ago
parent
commit
929d83003c
  1. 30
      src/test/c/Stefan/test_blackjack.c

30
src/test/c/Stefan/test_blackjack.c

@ -298,3 +298,33 @@ void test_subtract_bet_10_from_balance_100() {
TEST_ASSERT_EQUAL_INT(expected_result, actual_result); TEST_ASSERT_EQUAL_INT(expected_result, actual_result);
} }
void test_subtract_bet_100_from_balance_100() {
//arrange
int bet = 100;
int balance = 100;
int expected_result = 0;
//act
int actual_result = subtractBetFromBalanceBJ(bet, balance);
//assert
TEST_ASSERT_EQUAL_INT(expected_result, actual_result);
}
void test_subtract_bet_1_from_balance_100000() {
//arrange
int bet = 1;
int balance = 100000;
int expected_result = 99999;
//act
int actual_result = subtractBetFromBalanceBJ(bet, balance);
//assert
TEST_ASSERT_EQUAL_INT(expected_result, actual_result);
}
Loading…
Cancel
Save