You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

36 lines
688 B

#include "unity.h"
#include "../src/currentCustomerAccountBalance.c"
#include "../src/depositMoney.c"
#include "../src/updateCustomerAccountBalance.c"
void setUp(void)
{
}
void tearDown(void)
{
}
void test_depositSpecificAmount(void) {
/* Arrange */
int length = 5;
int userIDs[] = {1234,1235,1236,1237,1238};
float amountToDeposit[] = {200.5, 340, 244.5, 340, 1200};
bool result[length];
/* Act */
for (int i = 0; i < length; i++) {
result[i] = depositSpecificAmount( userIDs[i], amountToDeposit[i] );
}
/* Assert */
for (int i = 0; i < length; i++) {
TEST_ASSERT_TRUE(result[i]);
}
}