From 1d2743f544be20489339e2724d6b6cc8acfc8825 Mon Sep 17 00:00:00 2001 From: FelixKrull Date: Wed, 9 Feb 2022 10:51:07 +0100 Subject: [PATCH] Refactor PlayerTest --- src/test/java/PlayerTest.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/test/java/PlayerTest.java b/src/test/java/PlayerTest.java index 093e870..93a2c43 100644 --- a/src/test/java/PlayerTest.java +++ b/src/test/java/PlayerTest.java @@ -7,10 +7,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import java.io.ByteArrayInputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Iterator; +import java.util.*; import java.util.stream.Stream; public class PlayerTest { @@ -193,7 +190,7 @@ public class PlayerTest { Arguments.of("Input a letter or char", "g\n",new ArrayList<>(Arrays.asList(1,2,3,4)), -1), Arguments.of("Input a empty string", "\n",new ArrayList<>(Arrays.asList(1,2,3,4)), -1), Arguments.of("Input a special character", "&\n",new ArrayList<>(Arrays.asList(1,2,3,4)), -1), - Arguments.of("Only one Figure available", "1\n", new ArrayList<>(Arrays.asList(1)),1), + Arguments.of("Only one Figure available", "1\n", new ArrayList<>(List.of(1)),1), Arguments.of("Figure not available", "4\n", new ArrayList<>(Arrays.asList(1,2)),-1) ); }