Skip to content
Snippets Groups Projects
Commit 971f1e7d authored by AREZKI Celia's avatar AREZKI Celia
Browse files

modify the test

parent 457ba116
Branches
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ import util.TargetStrategy;
import java.util.*;
public class FirefighterBoard implements Board<List<ModelElement>> {
public class FirefighterBoard implements BoardBehavior<List<ModelElement>> ,BoardProperties<List<ModelElement>>{
private final int columnCount;
private final int rowCount;
private final int initialFireCount;
......
......@@ -10,17 +10,17 @@ import static org.assertj.core.api.Assertions.*;
public class FirefighterBoardTest {
@Test
void testColumnCount(){
Board<List<ModelElement>> board = new FirefighterBoard(20, 10, 1, 3);
FirefighterBoard board = new FirefighterBoard(20, 10, 1, 3);
assertThat(board.columnCount()).isEqualTo(20);
}
@Test
void testRowCount(){
Board<List<ModelElement>> board = new FirefighterBoard(20, 10, 1, 3);
FirefighterBoard board = new FirefighterBoard(20, 10, 1, 3);
assertThat(board.rowCount()).isEqualTo(10);
}
@Test
void testStepNumber(){
Board<List<ModelElement>> board = new FirefighterBoard(20, 10, 1, 3);
FirefighterBoard board = new FirefighterBoard(20, 10, 1, 3);
for(int index = 0; index < 10; index++){
assertThat(board.stepNumber()).isEqualTo(index);
board.updateToNextGeneration();
......@@ -29,7 +29,7 @@ public class FirefighterBoardTest {
}
@Test
void testGetState_afterSet(){
Board<List<ModelElement>> board = new FirefighterBoard(20, 10, 0, 0);
FirefighterBoard board = new FirefighterBoard(20, 10, 0, 0);
Position position = new Position(1,2);
assertThat(board.getState(position)).isEmpty();
board.setState(List.of(ModelElement.FIRE), position);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment