Browse Source

test getAmount methode

remotes/origin/feature/send-money
fdai6618 2 years ago
parent
commit
30aa84b943
  1. 1
      src/sendmoney.h
  2. 10
      test/test_sendmoney.c

1
src/sendmoney.h

@ -7,4 +7,5 @@
bool checkAccount(int accountNumber); bool checkAccount(int accountNumber);
double getAvailableAccountBalance(double balance); double getAvailableAccountBalance(double balance);
float getAmount(float amountToSend);
#endif // SENDMONEY_H #endif // SENDMONEY_H

10
test/test_sendmoney.c

@ -44,5 +44,15 @@ void test_getAvailableAccountBalance(void)
// Assert // Assert
TEST_ASSERT_EQUAL(expected, result); TEST_ASSERT_EQUAL(expected, result);
} }
// hier wird die Methode getAmount() getestet
void test_getAmount(void)
{
// Arrage
float expected = 500.1;
float result = getAmount(expected);
TEST_ASSERT_EQUAL(expected, result);
}
#endif // TEST #endif // TEST
Loading…
Cancel
Save