Commit e184dced authored by Benedikt Geißler's avatar Benedikt Geißler 🐸

Update this branch

parent a7b7341e
......@@ -3,7 +3,7 @@ plugins {
id 'net.ltgt.errorprone' version '0.0.8'
}
version = '0.2.0'
version = '0.2.1'
group = 'gone.corewars.library'
apply plugin: 'java'
......
......@@ -57,7 +57,7 @@ public class OutgoingMessagesSerializer {
.key("content")
.object()
.key("warriorRedcode").value(String.join(
NetworkConstants.REDCODESEPARATOR, content.warriorRedcode))
NetworkConstants.REDCODESEPARATOR, content.warriorRedcode))
.endObject()
.key("version").value(packetVersion)
.key("packageType").value("ready")
......@@ -86,8 +86,8 @@ public class OutgoingMessagesSerializer {
.object()
.key("content")
.object()
.key("fullState").value(String.join(
NetworkConstants.REDCODESEPARATOR, content.fullState))
.key("fullState").value(String.join(
NetworkConstants.REDCODESEPARATOR, content.fullState))
.key("players").value(content.players)
.endObject()
.key("version").value(packetVersion)
......
......@@ -13,6 +13,7 @@ import gone.lib.network.serialization.IncomingMessagesInterpreter;
import gone.lib.network.serialization.OutgoingMessagesSerializer;
import gone.lib.network.tcp.TcpClientModule;
import gone.lib.network.tcp.TcpServerModule;
import org.junit.Test;
import java.util.concurrent.Callable;
......
......@@ -8,7 +8,6 @@ import gone.lib.network.contracts.ITcpServerAccepted;
import gone.lib.network.tcp.TcpClientModule;
import gone.lib.network.tcp.TcpServerAccept;
import org.junit.Assert;
import org.junit.Test;
/**
......
......@@ -127,11 +127,11 @@ public class SerializationTest {
assertThat(content.players, is(newContent.players));
assertThat(content.fullState, is(newContent.fullState));
Assert.assertEquals(newContent.fullState.size(), content.fullState.size());
assertThat(newContent.fullState.size(), is(content.fullState.size()));
newContent.fullState.get(0).equals(content.fullState.get(0));
newContent.fullState.get(1).equals(content.fullState.get(1));
newContent.fullState.get(2).equals(content.fullState.get(2));
newContent.fullState.get(3).equals(content.fullState.get(3));
assertThat(newContent.fullState.get(0), is(content.fullState.get(0)));
assertThat(newContent.fullState.get(2), is(content.fullState.get(2)));
assertThat(newContent.fullState.get(3), is(content.fullState.get(3)));
assertThat(newContent.fullState.get(1), is(content.fullState.get(1)));
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment