|
@ -51,13 +51,13 @@ void test_initial_state(void){ |
|
|
TEST_ASSERT_EQUAL_INT( expectedState, newGame.currentState ); |
|
|
TEST_ASSERT_EQUAL_INT( expectedState, newGame.currentState ); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void test_userInput(void){ |
|
|
|
|
|
|
|
|
void test_command_startGame(void){ |
|
|
// arrange |
|
|
// arrange |
|
|
int expectedState = 1; |
|
|
int expectedState = 1; |
|
|
char* input = "start game"; |
|
|
char* input = "start game"; |
|
|
|
|
|
|
|
|
// act |
|
|
// act |
|
|
int actualState = handleState( input ); |
|
|
|
|
|
|
|
|
int actualState = handeCommand( input ); |
|
|
|
|
|
|
|
|
// assert |
|
|
// assert |
|
|
TEST_ASSERT_EQUAL_INT( expectedState, actualState ); |
|
|
TEST_ASSERT_EQUAL_INT( expectedState, actualState ); |