From 3796483c792064c4e3c8e999a505a0774eb570e5 Mon Sep 17 00:00:00 2001 From: Thomas Papendieck Date: Mon, 12 Dec 2022 21:30:11 +0100 Subject: [PATCH] =?UTF-8?q?Musterl=C3=B6sung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/de/edu/hsfulda/pmut/UebungTesten.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/test/java/de/edu/hsfulda/pmut/UebungTesten.java b/src/test/java/de/edu/hsfulda/pmut/UebungTesten.java index 08b16ac..2f15304 100644 --- a/src/test/java/de/edu/hsfulda/pmut/UebungTesten.java +++ b/src/test/java/de/edu/hsfulda/pmut/UebungTesten.java @@ -15,5 +15,20 @@ class UebungTesten { // act String result = berechnung.convert(2); // assert + assertThat(result).as("ordinary number ").isEqualTo(expected); + } + + @Test + void convert_5_to_buzz() { + String expected = "Buzz"; + String result = berechnung.convert(5); + assertThat(result).as("dividable by 5").isEqualTo(expected); + } + + @Test + void gcd_15_20_to_5() { + int expected = 5; + int result = berechnung.gcd(7*13,7*144); + assertThat(result).as("%d / %d",7*13,7*144).isEqualTo(expected); } }