From e1a1f6d450c5ffd79eb8132d13583606663d640d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 4 Nov 2015 14:17:18 +0300 Subject: add unit tests stub --- src/test/java/com/juick/tests/JsonTests.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/test/java/com/juick/tests/JsonTests.java (limited to 'src/test/java/com/juick') diff --git a/src/test/java/com/juick/tests/JsonTests.java b/src/test/java/com/juick/tests/JsonTests.java new file mode 100644 index 00000000..9a42dea5 --- /dev/null +++ b/src/test/java/com/juick/tests/JsonTests.java @@ -0,0 +1,23 @@ +package com.juick.tests; + +import com.google.gson.Gson; +import static org.junit.Assert.assertEquals; + +import org.junit.Test; + +import com.juick.Message; + +public class JsonTests { + @Test + public void CompareSerializers() { + Message msg = new Message(); + msg.ReplyTo = 1; + msg.MID = 234566; + Gson gson = new Gson(); + String gsonResult = gson.toJson(msg); + String ugnichResult = com.juick.json.Message.toJSON(msg).toString(); + System.out.println(gsonResult); + System.out.println(ugnichResult); + assertEquals("our result must equal to ugnich", ugnichResult, gsonResult); + } +} \ No newline at end of file -- cgit v1.2.3