From 69f5de9e8f6f1b936a36cf23168cf2e0e7e241ff Mon Sep 17 00:00:00 2001 From: alpina0707 Date: Mon, 31 Jan 2022 20:22:57 +0100 Subject: [PATCH] =?UTF-8?q?added=20AssertJ=20test=20for=20"maximale=20Laut?= =?UTF-8?q?st=C3=A4rke"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/java/device/RadioPlayerTest.java | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/test/java/device/RadioPlayerTest.java b/src/test/java/device/RadioPlayerTest.java index 124d995..22c525d 100644 --- a/src/test/java/device/RadioPlayerTest.java +++ b/src/test/java/device/RadioPlayerTest.java @@ -1,35 +1,26 @@ package device; -import org.junit.Before; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.*; class RadioPlayerTest { RadioPlayer rp = new RadioPlayer(); - @Before - void setup() - { - rp.setLautstaerke(0); - } + @Test void louder() { + rp.setLautstaerke(0); rp.louder(); assertThat(rp.getLautstaerke()).isEqualTo(1); } - @Before - void setup1() - { - rp.setLautstaerke(100); - } - @Test - void loudermax() { - + void louderMax() { + rp.setLautstaerke(100); + rp.louder(); + assertThat(rp.getLautstaerke()).isEqualTo(100); } /* @Test