Browse Source

Add test getAvailabeAccountBalance

remotes/origin/feature/get-current-customer-account-balance
Shivam Chaudhary 2 years ago
parent
commit
791b16b0e8
  1. 10
      tests/test_currentCustomerAccountBalance.c

10
tests/test_currentCustomerAccountBalance.c

@ -1,7 +1,7 @@
#ifdef TEST #ifdef TEST
#include <float.h>
#include "unity.h" #include "unity.h"
#include "currentCustomerAccountBalance.h" #include "currentCustomerAccountBalance.h"
void setUp(void) void setUp(void)
@ -58,6 +58,14 @@ void test_failOpenFile(void) {
} }
void test_getAvailableAccountBalance(void) {
int user_id = 1234;
float max = FLT_MAX;
int result = getAvailableAccountBalance(user_id);
TEST_ASSERT_TRUE(result < max);
}

Loading…
Cancel
Save