|
@ -132,21 +132,16 @@ void test_invalidEmployeeAccessCode(void) |
|
|
/*Arrange*/ |
|
|
/*Arrange*/ |
|
|
|
|
|
|
|
|
char* invalidAccessCode[] = {"15","foo","fizz","buzz","fizzbuzz","test","bankmanagement"}; |
|
|
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++) |
|
|
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 |
|
|
#endif // TEST |