From 929d83003c6b30c3f8149c921d89dcfec256141d Mon Sep 17 00:00:00 2001 From: fdai7472 Date: Wed, 7 Feb 2024 10:30:40 +0100 Subject: [PATCH] weitere Tests zur Berechnung Guthaben --- src/test/c/Stefan/test_blackjack.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/test/c/Stefan/test_blackjack.c b/src/test/c/Stefan/test_blackjack.c index 7790cd9..6a9dcd6 100644 --- a/src/test/c/Stefan/test_blackjack.c +++ b/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); } + +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); + +} \ No newline at end of file