private void setExamplePlayerFavor() { sut.setPlayerFavor(new int[] {1, 1, 2}); sut.setPlayerFavor(new int[] {2, 1, 3}); sut.setPlayerFavor(new int[] {3, 0}); sut.setPlayerFavor(new int[] {4, 2, 2, 3}); sut.setPlayerFavor(new int[] {5, 1, 4}); }
@Test public void testSetPlayerFavor_EmptyList() throws Exception { // Given int[] player1Favor = {3, 0}; List<Integer> playerFavorList = new ArrayList<>(); // When sut.setPlayerFavor(player1Favor); // Then assertThat(sut.getPlayerFavor(3), is(playerFavorList)); }
@Test public void testSetPlayerFavor() throws Exception { // Given int[] player1Favor = {4, 2, 2, 3}; List<Integer> playerFavorList = new ArrayList<>(Arrays.asList(2, 3)); // When sut.setPlayerFavor(player1Favor); // Then assertThat(sut.getPlayerFavor(4), is(playerFavorList)); }