Skip to content
Snippets Groups Projects
Commit 6c011597 authored by TRAVERS Corentin's avatar TRAVERS Corentin Committed by SAIDI Hatim
Browse files

test

parent f1b2f519
Branches
No related tags found
No related merge requests found
...@@ -6,5 +6,6 @@ Il s'agit d'implémenter une version du jeu "inondation" (voir par exemple [ici] ...@@ -6,5 +6,6 @@ Il s'agit d'implémenter une version du jeu "inondation" (voir par exemple [ici]
## Membre du projet ## Membre du projet
- NOM, prénom - SAIDI Hatim 2.2
- NOM, prénom - NSSAIRY Mohamed-Amine 2.2
- AIX MONTERRIN
...@@ -11,7 +11,9 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; ...@@ -11,7 +11,9 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
class ArrayGridTest { class ArrayGridTest {
// TODO
// uncomment
/*
private ArrayGrid arrayGridThreeFour; private ArrayGrid arrayGridThreeFour;
private final ArrayGrid arrayGridTwoTwo = new ArrayGrid(2,2); private final ArrayGrid arrayGridTwoTwo = new ArrayGrid(2,2);
...@@ -87,4 +89,5 @@ class ArrayGridTest { ...@@ -87,4 +89,5 @@ class ArrayGridTest {
assertThat(iterator.hasNext()).isFalse(); assertThat(iterator.hasNext()).isFalse();
} }
*/
} }
\ No newline at end of file
...@@ -11,7 +11,8 @@ import static org.assertj.core.api.Assertions.assertThat; ...@@ -11,7 +11,8 @@ import static org.assertj.core.api.Assertions.assertThat;
class ColoredCellIteratorTest { class ColoredCellIteratorTest {
// TODO
// uncomment
/* /*
* +---+---+---+ * +---+---+---+
* | R | B | R | * | R | B | R |
...@@ -22,7 +23,7 @@ class ColoredCellIteratorTest { ...@@ -22,7 +23,7 @@ class ColoredCellIteratorTest {
* +---+---+---+ * +---+---+---+
*/ */
private static ArrayGrid gridThreeThree = new ArrayGrid(3,3); /* private static ArrayGrid gridThreeThree = new ArrayGrid(3,3);
@BeforeAll @BeforeAll
private static void initializeColorsGrid(){ private static void initializeColorsGrid(){
...@@ -55,5 +56,5 @@ class ColoredCellIteratorTest { ...@@ -55,5 +56,5 @@ class ColoredCellIteratorTest {
assertThat(fromIteratorCells).hasSameElementsAs(expectedBlackCells).hasSameSizeAs(expectedBlackCells); assertThat(fromIteratorCells).hasSameElementsAs(expectedBlackCells).hasSameSizeAs(expectedBlackCells);
} }
*/
} }
\ No newline at end of file
...@@ -7,19 +7,19 @@ import static org.assertj.core.api.Assertions.assertThat; ...@@ -7,19 +7,19 @@ import static org.assertj.core.api.Assertions.assertThat;
class ComputerPlayerTest { class ComputerPlayerTest {
// TODO
// uncomment and adapt
/*
@Test @Test
void testSetStrategyAndPlay() { void testSetStrategyAndPlay() {
ComputerPlayer player = new ComputerPlayer("computer",null); ComputerPlayer player = new ComputerPlayer(new SquareCell(),null);
player.setStrategy(startCell -> Color.INDIGO); player.setStrategy(startCell -> Color.INDIGO);
player.setStartCell(new SquareCell());
assertThat(player.play()).isEqualTo(Color.INDIGO); assertThat(player.play()).isEqualTo(Color.INDIGO);
} }
@Test @Test
void testIsHuman() { void testIsHuman() {
assertThat(new ComputerPlayer("computer", null).isHuman()).isFalse(); assertThat(new ComputerPlayer(new SquareCell(), null).isHuman()).isFalse();
} }*/
} }
\ No newline at end of file
...@@ -9,6 +9,10 @@ import java.util.List; ...@@ -9,6 +9,10 @@ import java.util.List;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
class DistinctColorGeneratorTest { class DistinctColorGeneratorTest {
// TODO
// uncomment
/*
private final static Color initialColor = Color.GRAY; private final static Color initialColor = Color.GRAY;
private final Grid grid = new ArrayGrid(2,3); private final Grid grid = new ArrayGrid(2,3);
@BeforeEach @BeforeEach
...@@ -36,4 +40,5 @@ class DistinctColorGeneratorTest { ...@@ -36,4 +40,5 @@ class DistinctColorGeneratorTest {
assertThat(cell.getColor()).isNotEqualTo(defaultColor).isNotEqualTo(initialColor); assertThat(cell.getColor()).isNotEqualTo(defaultColor).isNotEqualTo(initialColor);
} }
} }
*/
} }
\ No newline at end of file
...@@ -9,6 +9,9 @@ import static org.assertj.core.api.Assertions.assertThat; ...@@ -9,6 +9,9 @@ import static org.assertj.core.api.Assertions.assertThat;
class FloodGameTest { class FloodGameTest {
// TODO
// uncomment
/*
private final int totalNumberOfCells = 6; private final int totalNumberOfCells = 6;
private final Grid gridTwoThree = new ArrayGrid(2,3); private final Grid gridTwoThree = new ArrayGrid(2,3);
private final Color colorONE = RED; private final Color colorONE = RED;
...@@ -89,5 +92,5 @@ class FloodGameTest { ...@@ -89,5 +92,5 @@ class FloodGameTest {
fillGridYellow(gridTwoThree); fillGridYellow(gridTwoThree);
assertThat(game.hasEnded()).isTrue(); assertThat(game.hasEnded()).isTrue();
} }
*/
} }
\ No newline at end of file
...@@ -11,7 +11,9 @@ import static org.assertj.core.api.Assertions.assertThat; ...@@ -11,7 +11,9 @@ import static org.assertj.core.api.Assertions.assertThat;
class SquareCellTest { class SquareCellTest {
// TODO
// uncomment
/*
private final Cell northCell = new SquareCell(Color.NAVY); private final Cell northCell = new SquareCell(Color.NAVY);
private final Cell southCell = new SquareCell(Color.SALMON); private final Cell southCell = new SquareCell(Color.SALMON);
private final Cell westCell = new SquareCell(Color.WHEAT); private final Cell westCell = new SquareCell(Color.WHEAT);
...@@ -48,4 +50,6 @@ class SquareCellTest { ...@@ -48,4 +50,6 @@ class SquareCellTest {
centralCell.setNeighbours(List.of(northCell,southCell)); centralCell.setNeighbours(List.of(northCell,southCell));
assertThat(centralCell.getNeighbours()).containsExactlyInAnyOrder(northCell,southCell); assertThat(centralCell.getNeighbours()).containsExactlyInAnyOrder(northCell,southCell);
} }
*/
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment