Browse Source

Refactor PlayerTest

AIPlayer
FelixKrull 3 years ago
parent
commit
1d2743f544
  1. 7
      src/test/java/PlayerTest.java

7
src/test/java/PlayerTest.java

@ -7,10 +7,7 @@ import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.MethodSource;
import java.io.ByteArrayInputStream; 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; import java.util.stream.Stream;
public class PlayerTest { 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 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 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("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) Arguments.of("Figure not available", "4\n", new ArrayList<>(Arrays.asList(1,2)),-1)
); );
} }

Loading…
Cancel
Save