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.

58 lines
998 B

  1. #ifdef TEST
  2. #include <sendmoney.h>
  3. #include <unity.h>
  4. void setUp(void)
  5. {
  6. }
  7. void tearDown(void)
  8. {
  9. }
  10. // hier wird die Methode checkAccount getestet
  11. void test_sendmoney_NeedToImplement(void)
  12. {
  13. // Arrage
  14. int accountNumber = 1234567;
  15. int accountNumber2 = 5555557;
  16. bool expected;
  17. bool expected2;
  18. // Act
  19. expected = checkAccount(accountNumber);
  20. expected2 = checkAccount(accountNumber2);
  21. // Assert
  22. TEST_ASSERT_TRUE(expected);
  23. TEST_ASSERT_TRUE(expected2);
  24. }
  25. // hier wird die Methode getAvailableAccountBalance()getestet
  26. void test_getAvailableAccountBalance(void)
  27. {
  28. // Arrage
  29. double expected = 500.0;
  30. // Act
  31. double result = getAvailableAccountBalance(expected1);
  32. // Assert
  33. TEST_ASSERT_EQUAL(expected, result);
  34. }
  35. // hier wird die Methode getAmount() getestet
  36. void test_getAmount(void)
  37. {
  38. // Arrage
  39. float expected = 500.1;
  40. float result = getAmount(expected);
  41. TEST_ASSERT_EQUAL(expected, result);
  42. }
  43. #endif // TEST