From fb39982e6ed05ecf87aa5017d65fb7a563b8bc9a Mon Sep 17 00:00:00 2001 From: Jonas Wagner Date: Tue, 1 Feb 2022 09:13:49 +0100 Subject: [PATCH] Refactor choose Method --- src/main/java/Player.java | 1 - src/test/java/PlayerTest.java | 6 ------ 2 files changed, 7 deletions(-) diff --git a/src/main/java/Player.java b/src/main/java/Player.java index 242bb02..d26e0f3 100644 --- a/src/main/java/Player.java +++ b/src/main/java/Player.java @@ -1,4 +1,3 @@ -import java.io.InputStream; import java.util.ArrayList; import java.util.Iterator; import java.util.Scanner; diff --git a/src/test/java/PlayerTest.java b/src/test/java/PlayerTest.java index 62ced73..c419115 100644 --- a/src/test/java/PlayerTest.java +++ b/src/test/java/PlayerTest.java @@ -7,9 +7,6 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -180,11 +177,8 @@ public class PlayerTest { @ParameterizedTest @MethodSource("checkChooseMethodData") void checkChoose(String testName, String input, int expectedResult) { - InputStream stdin = System.in; System.setIn(new ByteArrayInputStream(input.getBytes())); - int calculatedResult = p.choose(); - assertThat(calculatedResult).describedAs(testName).isEqualTo(expectedResult); }