aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ch/epfl/xblast/GameStateDeserializerTest.java26
-rw-r--r--test/ch/epfl/xblast/client/GameStateDeserializerTest.java27
-rw-r--r--test/ch/epfl/xblast/server/BlockTest.java2
3 files changed, 28 insertions, 27 deletions
diff --git a/test/ch/epfl/xblast/GameStateDeserializerTest.java b/test/ch/epfl/xblast/GameStateDeserializerTest.java
deleted file mode 100644
index 4f4fac1..0000000
--- a/test/ch/epfl/xblast/GameStateDeserializerTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
1package ch.epfl.xblast;
2
3import ch.epfl.xblast.client.*;
4import ch.epfl.xblast.server.*;
5import ch.epfl.xblast.server.Level;
6import org.junit.Assert;
7import org.junit.Test;
8
9import java.lang.reflect.Array;
10import java.util.ArrayList;
11import java.util.Arrays;
12import java.util.List;
13import java.util.stream.Collectors;
14
15/**
16 * @author Timothée FLOURE (257420)
17 */
18public class GameStateDeserializerTest {
19 /**
20 * Check if we can deserialize the initial GameState...
21 */
22 @Test
23 public void InitialGameStateDeserializationTest() {
24 GameStateDeserializer.deserialize(GameStateSerializerTest.getInitialValues());
25 }
26}
diff --git a/test/ch/epfl/xblast/client/GameStateDeserializerTest.java b/test/ch/epfl/xblast/client/GameStateDeserializerTest.java
new file mode 100644
index 0000000..e74728e
--- /dev/null
+++ b/test/ch/epfl/xblast/client/GameStateDeserializerTest.java
@@ -0,0 +1,27 @@
1package ch.epfl.xblast.client;
2
3import ch.epfl.xblast.GameStateSerializerTest;
4import org.junit.Test;
5
6import java.util.List;
7
8import static org.junit.Assert.fail;
9
10/**
11 * @author Timothée FLOURE (257420)
12 * @author Pacien TRAN-GIRARD (261948)
13 */
14public class GameStateDeserializerTest {
15
16 private static final List<Byte> SERIALIZED_INITIAL_GAME_STATE = GameStateSerializerTest.getInitialValues();
17
18 @Test
19 public void deserializationTerminates() {
20 try {
21 GameStateDeserializer.deserialize(SERIALIZED_INITIAL_GAME_STATE);
22 } catch (Exception e) {
23 fail(e.getMessage());
24 }
25 }
26
27}
diff --git a/test/ch/epfl/xblast/server/BlockTest.java b/test/ch/epfl/xblast/server/BlockTest.java
index 31fd08a..9938299 100644
--- a/test/ch/epfl/xblast/server/BlockTest.java
+++ b/test/ch/epfl/xblast/server/BlockTest.java
@@ -7,7 +7,7 @@ import static org.junit.Assert.assertTrue;
7 7
8/** 8/**
9 * @author Timothée FLOURE (257420) 9 * @author Timothée FLOURE (257420)
10 * @author pacien TRAN-GIRARD (261948) 10 * @author Pacien TRAN-GIRARD (261948)
11 */ 11 */
12public class BlockTest { 12public class BlockTest {
13 13