aboutsummaryrefslogtreecommitdiff
path: root/test/ch/epfl/xblast/server/BoardTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/ch/epfl/xblast/server/BoardTest.java')
-rw-r--r--test/ch/epfl/xblast/server/BoardTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/ch/epfl/xblast/server/BoardTest.java b/test/ch/epfl/xblast/server/BoardTest.java
index a7794d1..44feffb 100644
--- a/test/ch/epfl/xblast/server/BoardTest.java
+++ b/test/ch/epfl/xblast/server/BoardTest.java
@@ -5,6 +5,7 @@ import ch.epfl.xblast.Cell;
5import org.junit.Test; 5import org.junit.Test;
6 6
7import java.util.ArrayList; 7import java.util.ArrayList;
8import java.util.Arrays;
8import java.util.List; 9import java.util.List;
9 10
10import static org.junit.Assert.*; 11import static org.junit.Assert.*;
@@ -15,6 +16,26 @@ import static org.junit.Assert.*;
15 */ 16 */
16public class BoardTest { 17public class BoardTest {
17 18
19 /**
20 * Builds and returns a NW Quadrant map.
21 *
22 * @return the map
23 */
24 public static List<List<Block>> buildNWQuadrantMap() {
25 Block __ = Block.FREE;
26 Block XX = Block.INDESTRUCTIBLE_WALL;
27 Block OO = Block.DESTRUCTIBLE_WALL;
28
29 List<List<Block>> map = new ArrayList<>(7);
30 map.add(Arrays.asList(__, __, __, __, __, __, __));
31 map.add(Arrays.asList(__, XX, OO, XX, OO, XX, OO));
32 map.add(Arrays.asList(__, OO, __, __, __, OO, __));
33 map.add(Arrays.asList(OO, XX, __, XX, XX, XX, XX));
34 map.add(Arrays.asList(__, OO, __, OO, __, __, __));
35 map.add(Arrays.asList(OO, XX, OO, XX, OO, XX, __));
36 return map;
37 }
38
18 @Test(expected = IllegalArgumentException.class) 39 @Test(expected = IllegalArgumentException.class)
19 public void isBoardBuilderEmptyInputThrowingException() { 40 public void isBoardBuilderEmptyInputThrowingException() {
20 List<Sq<Block>> blocks = new ArrayList<>(); 41 List<Sq<Block>> blocks = new ArrayList<>();