From 791b16b0e84fe35e89695d26b38fb4064c51ed43 Mon Sep 17 00:00:00 2001 From: Shivam Chaudhary Date: Tue, 7 Feb 2023 09:58:49 +0100 Subject: [PATCH] Add test getAvailabeAccountBalance --- tests/test_currentCustomerAccountBalance.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/test_currentCustomerAccountBalance.c b/tests/test_currentCustomerAccountBalance.c index 6d1da03..4855135 100644 --- a/tests/test_currentCustomerAccountBalance.c +++ b/tests/test_currentCustomerAccountBalance.c @@ -1,7 +1,7 @@ #ifdef TEST +#include #include "unity.h" - #include "currentCustomerAccountBalance.h" 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); +} +