From 30aa84b9436bfcec1622b7a3c8f1074675b764af Mon Sep 17 00:00:00 2001 From: fdai6618 <74294567+fdai6618@users.noreply.github.com> Date: Sat, 4 Feb 2023 11:35:21 +0100 Subject: [PATCH] test getAmount methode --- src/sendmoney.h | 1 + test/test_sendmoney.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/sendmoney.h b/src/sendmoney.h index 5feb02d..4bc6bb4 100644 --- a/src/sendmoney.h +++ b/src/sendmoney.h @@ -7,4 +7,5 @@ bool checkAccount(int accountNumber); double getAvailableAccountBalance(double balance); +float getAmount(float amountToSend); #endif // SENDMONEY_H diff --git a/test/test_sendmoney.c b/test/test_sendmoney.c index 49e18d0..9db034c 100644 --- a/test/test_sendmoney.c +++ b/test/test_sendmoney.c @@ -44,5 +44,15 @@ void test_getAvailableAccountBalance(void) // Assert 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