diff --git a/tests/test_CustomerMenu.c b/tests/test_CustomerMenu.c deleted file mode 100644 index 044301b..0000000 --- a/tests/test_CustomerMenu.c +++ /dev/null @@ -1,26 +0,0 @@ -#include -#include "../src/customerMenu.c" -#include "../src/requestLoan.c" - -void test_customerChoiceForMenuEntry() -{ - int decision = 1; - unsigned int *ptr = NULL; - /*customer choses to send money, return 1*/ - TEST_ASSERT_EQUAL_INT(1, customerChoiceForMenuItem(decision,ptr)); - /*customer choses to withdraw money, return 2*/ - decision = 2; - TEST_ASSERT_EQUAL_INT(2, customerChoiceForMenuItem(decision,ptr)); - /*customer choses to deposit money, return 3*/ - decision = 3; - TEST_ASSERT_EQUAL_INT(3, customerChoiceForMenuItem(decision,ptr)); - /*customer choses to request a loan, return 4*/ - decision = 4; - TEST_ASSERT_EQUAL_INT(4, customerChoiceForMenuItem(decision,ptr)); - /*invalid input values, the return value should always be -1*/ - int arrayOfInvalidValues[] = {-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,0, 123,3247,6839,38593,3033,55055}; - int length = sizeof(arrayOfInvalidValues)/sizeof(int); - for(int i=0;i