diff --git a/test/test_employeeLogin.c b/test/test_employeeLogin.c index e29bf5d..8860af5 100644 --- a/test/test_employeeLogin.c +++ b/test/test_employeeLogin.c @@ -132,21 +132,16 @@ void test_invalidEmployeeAccessCode(void) /*Arrange*/ char* invalidAccessCode[] = {"15","foo","fizz","buzz","fizzbuzz","test","bankmanagement"}; - bool invalidCodeResults[7]; + bool invalidCodeExpectation = false; - /*Act*/ + /*Act and assert*/ for(int i=0;i<7;i++) { - invalidCodeResults[i] = employeesAccess(invalidAccessCode[i]); + bool invalidCodeResults = employeesAccess(invalidAccessCode[i]); + TEST_ASSERT_EQUAL(invalidCodeExpectation,invalidCodeResults); } - /*Assert*/ - - for(int i=0;i<7;i++) - { - TEST_ASSERT_FALSE(invalidCodeResults[i]); - } } #endif // TEST