Browse Source

Implement test to check if the file opens

remotes/origin/feature/get-current-customer-account-balance
Shivam Chaudhary 2 years ago
parent
commit
8274f848fd
  1. 15
      tests/test_currentCustomerAccountBalance.c

15
tests/test_currentCustomerAccountBalance.c

@ -12,8 +12,7 @@ void tearDown(void)
{ {
} }
void test_fetchBalanceFromBalanceString(void)
{
void test_fetchBalanceFromBalanceString(void) {
char balanceString[5][100] = { char balanceString[5][100] = {
"balance=0", "balance=0",
"balance=100", "balance=100",
@ -43,4 +42,16 @@ void test_fetchBalanceFromBalanceString(void)
} }
void test_checkFileOpen(void) {
FILE *file = fopen(CUSTOMER_DATA_FILE, "r");
TEST_ASSERT_TRUE(file);
fclose(file);
}
#endif // TEST #endif // TEST
Loading…
Cancel
Save