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.

39 lines
613 B

  1. #ifdef TEST
  2. #include "unity.h"
  3. #include "depositMoney.h"
  4. void setUp(void)
  5. {
  6. }
  7. void tearDown(void)
  8. {
  9. }
  10. void test_depositSpecificAmount(void) {
  11. /* Arrange */
  12. int length = 5;
  13. int userIDs[] = {1234,1235,1236,1237,1238};
  14. float amountToDeposit[] = {200.5, 340, 244.5, 340, 1200};
  15. bool result[length];
  16. /* Act */
  17. for (int i = 0; i < length; i++) {
  18. result[i] = depositSpecificAmount( userIDs[i], amountToDeposit[i] );
  19. }
  20. /* Assert */
  21. for (int i = 0; i < length; i++) {
  22. TEST_ASSERT_TRUE(result[i]);
  23. }
  24. }
  25. #endif // TEST