From 81e7376303dd39cd1fafc4c96b71dfafc85c71a7 Mon Sep 17 00:00:00 2001 From: fdai7472 Date: Wed, 7 Feb 2024 11:28:29 +0100 Subject: [PATCH] weitere Tests zu Gewinnberechnung bei max win --- src/test/c/Stefan/test_slot_machine.c | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/test/c/Stefan/test_slot_machine.c b/src/test/c/Stefan/test_slot_machine.c index 1fd8b1d..b3e2e94 100644 --- a/src/test/c/Stefan/test_slot_machine.c +++ b/src/test/c/Stefan/test_slot_machine.c @@ -209,6 +209,48 @@ void test_9_A_max_win_bet_equals_10() { TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); } +void test_9_B_max_win_bet_equals_10() { + + //arrange + char testSymbols[] = {"BBBBBBBBB"}; + + int expectedResult = 1500; + + //act + int actualResult = getWinnings(testSymbols, 10); + + //assert + TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); +} + +void test_9_C_max_win_bet_equals_10() { + + //arrange + char testSymbols[] = {"CCCCCCCCC"}; + + int expectedResult = 3000; + + //act + int actualResult = getWinnings(testSymbols, 10); + + //assert + TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); +} + +void test_9_D_max_win_bet_equals_10() { + + //arrange + char testSymbols[] = {"DDDDDDDDD"}; + + int expectedResult = 6000; + + //act + int actualResult = getWinnings(testSymbols, 10); + + //assert + TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); +} + void test_3_B_3_C_3_D_won_bet_equals_10() { //arrange