Browse Source
Merge branch 'feature/balance-operations' of https://gitlab2.informatik.hs-fulda.de/fdai7057/bankmanagement-system into feature/balance-operations
remotes/origin/feature/balance-operations
Merge branch 'feature/balance-operations' of https://gitlab2.informatik.hs-fulda.de/fdai7057/bankmanagement-system into feature/balance-operations
remotes/origin/feature/balance-operations
fdai7207
2 years ago
11 changed files with 163 additions and 32 deletions
-
4src/currentCustomerAccountBalance.h
-
20src/displayDisclaimer.c
-
7src/displayDisclaimer.h
-
67src/interestCalculator.c
-
1src/interestCalculator.h
-
18src/sendMoney.c
-
0src/sendMoney.h
-
4src/updateCustomerAccountBalance.h
-
8src/withdrawMoney.c
-
39tests/test_depositMoney.c
-
9tests/test_updateCustomerAccountBalance.c
@ -0,0 +1,20 @@ |
|||||
|
#include "displayDisclaimer.h" |
||||
|
|
||||
|
void displayDisclaimer(){ |
||||
|
printf(" W E L C O M E T O \n"); |
||||
|
printf(" .______ .___ ___. _______.\n"); |
||||
|
printf(" | _ \\ | \\/ | / |\n"); |
||||
|
printf(" | |_) | | \\ / | | (----`\n"); |
||||
|
printf(" | _ < | |\\/| | \\ \\ \n"); |
||||
|
printf(" | |_) | | | | | .----) | \n"); |
||||
|
printf(" |______/ |__| |__| |_______/ \n"); |
||||
|
printf(" \n"); |
||||
|
printf("B A N K M A N A G E M E N T S Y S T E M\n"); |
||||
|
printf(":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:\n"); |
||||
|
printf("Created by Atharva, Can, Haytham, Julius, Shivam, and Yahya for AI1001.\n"); |
||||
|
} |
||||
|
|
||||
|
// int main(){ |
||||
|
// displayDisclaimer(); |
||||
|
// return 1; |
||||
|
// } |
@ -0,0 +1,7 @@ |
|||||
|
#ifndef DISPLAYDISCLAIMER_H_ |
||||
|
#define DISPLAYDISCLAIMER_H_ |
||||
|
#include <stdio.h> |
||||
|
|
||||
|
void displayDisclaimer(); |
||||
|
|
||||
|
#endif |
@ -0,0 +1,39 @@ |
|||||
|
#ifdef TEST |
||||
|
|
||||
|
#include "unity.h" |
||||
|
#include "depositMoney.h" |
||||
|
|
||||
|
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]); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
#endif // TEST |
Write
Preview
Loading…
Cancel
Save
Reference in new issue