|
@ -174,16 +174,16 @@ public class PlayerTest { |
|
|
|
|
|
|
|
|
static Stream<Arguments> checkChooseMethodData() { |
|
|
static Stream<Arguments> checkChooseMethodData() { |
|
|
return Stream.of( |
|
|
return Stream.of( |
|
|
Arguments.of("Figure 1 choosen", "1\n", new ArrayList<>(Arrays.asList(1,2,3,4)), 1), |
|
|
|
|
|
Arguments.of("Figure 2 choosen", "2\n", new ArrayList<>(Arrays.asList(1,2,3,4)), 2), |
|
|
|
|
|
Arguments.of("Figure 3 choosen", "3\n", new ArrayList<>(Arrays.asList(1,2,3,4)),3), |
|
|
|
|
|
Arguments.of("Figure 4 choosen", "4\n", new ArrayList<>(Arrays.asList(1,2,3,4)),4), |
|
|
|
|
|
Arguments.of("Index out of bounds choosen", "16\n",new ArrayList<>(Arrays.asList(1,2,3,4)), -1), |
|
|
|
|
|
Arguments.of("Index out of bounds choosen", "-2\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 special character", "&\n",new ArrayList<>(Arrays.asList(1,2,3,4)), -1), |
|
|
|
|
|
Arguments.of("Only one Figure available", "1\n", new ArrayList<>(List.of(1)),1), |
|
|
|
|
|
|
|
|
Arguments.of("Figure 1 choosen", "1\n", new ArrayList<>(Arrays.asList(0,1,2,3)), 0), |
|
|
|
|
|
Arguments.of("Figure 2 choosen", "2\n", new ArrayList<>(Arrays.asList(0,1,2,3)), 1), |
|
|
|
|
|
Arguments.of("Figure 3 choosen", "3\n", new ArrayList<>(Arrays.asList(0,1,2,3)),2), |
|
|
|
|
|
Arguments.of("Figure 4 choosen", "4\n", new ArrayList<>(Arrays.asList(0,1,2,3)),3), |
|
|
|
|
|
Arguments.of("Index out of bounds choosen", "16\n",new ArrayList<>(Arrays.asList(0,1,2,3)), -1), |
|
|
|
|
|
Arguments.of("Index out of bounds choosen", "-2\n",new ArrayList<>(Arrays.asList(0,1,2,3)), -1), |
|
|
|
|
|
Arguments.of("Input a letter or char", "g\n",new ArrayList<>(Arrays.asList(0,1,2,3)), -1), |
|
|
|
|
|
Arguments.of("Input a empty string", "\n",new ArrayList<>(Arrays.asList(0,1,2,3)), -1), |
|
|
|
|
|
Arguments.of("Input a special character", "&\n",new ArrayList<>(Arrays.asList(0,1,2,3)), -1), |
|
|
|
|
|
Arguments.of("Only one Figure available", "1\n", new ArrayList<>(List.of(0)), 0), |
|
|
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) |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|