diff --git a/src/test/c/Stefan/test_slot_machine.c b/src/test/c/Stefan/test_slot_machine.c index 76f8258..8a05f53 100644 --- a/src/test/c/Stefan/test_slot_machine.c +++ b/src/test/c/Stefan/test_slot_machine.c @@ -45,7 +45,6 @@ void test_no_rows_won_bet_equals_10() { //arrange char testSymbols[] = {"AABAACAAD"}; - int expectedResult = 0; //act @@ -54,3 +53,59 @@ void test_no_rows_won_bet_equals_10() { //assert TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); } + +void test_3_A_won_bet_equals_10() { + + //arrange + char testSymbols[] = {"AAAAACAAD"}; + + int expectedResult = 30; + + //act + int actualResult = getWinnings(testSymbols, 10); + + //assert + TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); +} + +void test_3_B_won_bet_equals_10() { + + //arrange + char testSymbols[] = {"BBBAACAAD"}; + + int expectedResult = 50; + + //act + int actualResult = getWinnings(testSymbols, 10); + + //assert + TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); +} + +void test_3_C_won_bet_equals_10() { + + //arrange + char testSymbols[] = {"BABAACCCC"}; + + int expectedResult = 100; + + //act + int actualResult = getWinnings(testSymbols, 10); + + //assert + TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); +} + +void test_3_D_won_bet_equals_10() { + + //arrange + char testSymbols[] = {"BABDDDCAC"}; + + int expectedResult = 200; + + //act + int actualResult = getWinnings(testSymbols, 10); + + //assert + TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); +}