|
@ -32,5 +32,26 @@ void test_checkLoanEligibilitySuccess(void) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_checkLoanEligibilityFailure(void) { |
|
|
|
|
|
|
|
|
|
|
|
/* Arrange */ |
|
|
|
|
|
|
|
|
|
|
|
int user_id[3] = {12314, 127, 166}; // Random wrong user_ids |
|
|
|
|
|
|
|
|
|
|
|
bool result[3]; |
|
|
|
|
|
|
|
|
|
|
|
/* Act */ |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 3; i++) { |
|
|
|
|
|
result[i] = checkLoanEligibility(user_id[i]); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Assert */ |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 3; i++) { |
|
|
|
|
|
TEST_ASSERT_FALSE(result[i]); // Pass if the returned result is false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // TEST |
|
|
#endif // TEST |