From a8c5b73431720cac5a4a7a5479c5441345f13b99 Mon Sep 17 00:00:00 2001 From: fdai7472 Date: Mon, 29 Jan 2024 16:19:46 +0100 Subject: [PATCH] weitere Tests Wetteinsatz vom Guthaben abziehen --- src/test/c/Stefan/test_slot_machine.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/test/c/Stefan/test_slot_machine.c b/src/test/c/Stefan/test_slot_machine.c index 4afa387..9781e62 100644 --- a/src/test/c/Stefan/test_slot_machine.c +++ b/src/test/c/Stefan/test_slot_machine.c @@ -13,6 +13,29 @@ void test_subtract_bet_10_from_balance_10() { //act 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 TEST_ASSERT_EQUAL_INT(expectedResult, actualResult); } \ No newline at end of file