From 47a4cc59a5923df3c16414b1bd513c07a196ad1c Mon Sep 17 00:00:00 2001 From: jannisfingerhut Date: Fri, 10 Feb 2023 23:22:00 +0100 Subject: [PATCH] #30 UnitTest --- LernProgramm/testProgramm.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/LernProgramm/testProgramm.java b/LernProgramm/testProgramm.java index ff7431b..f18fcc6 100644 --- a/LernProgramm/testProgramm.java +++ b/LernProgramm/testProgramm.java @@ -60,6 +60,19 @@ class testProgramm { assertEquals(0, result); } +// Taschenrechner + @Test + public void testAddition1() { + + double result = 2 + 3.5; + assertEquals(5.5, result, 0); + } + + @Test + public void testSubtraction1() { + double result = 5 - 3.5; + assertEquals(1.5, result, 0); + }