diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/juick/json/MessageSerializer.java | 6 | ||||
-rw-r--r-- | src/test/java/com/juick/tests/ApiTests.java | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/test/java/com/juick/json/MessageSerializer.java b/src/test/java/com/juick/json/MessageSerializer.java index 38596a1a..b49c991a 100644 --- a/src/test/java/com/juick/json/MessageSerializer.java +++ b/src/test/java/com/juick/json/MessageSerializer.java @@ -76,7 +76,7 @@ public class MessageSerializer extends JSONSerializer<Message> { } if (json.has("replies")) { - jmsg.Replies = json.getInt("replies"); + jmsg.setReplies(json.getInt("replies")); } if (json.has("photo")) { @@ -123,8 +123,8 @@ public class MessageSerializer extends JSONSerializer<Message> { if (msg.getTags() != null && msg.getTags().size() > 0) { json.put("tags", new JSONArray(msg.getTags().stream().map(Tag::getName).collect(Collectors.toList()))); } - if (msg.Replies > 0) { - json.put("replies", msg.Replies); + if (msg.getReplies() > 0) { + json.put("replies", msg.getReplies()); } if (msg.Place != null) { json.put("place", placeSerializer.serialize(msg.Place)); diff --git a/src/test/java/com/juick/tests/ApiTests.java b/src/test/java/com/juick/tests/ApiTests.java index 1d777d62..1c13c1a7 100644 --- a/src/test/java/com/juick/tests/ApiTests.java +++ b/src/test/java/com/juick/tests/ApiTests.java @@ -85,7 +85,7 @@ public class ApiTests { int rid = MessagesQueries.createReply(jdbc, msg2.getMid(), 0, ugnich.getUid(), "bla-bla", null); assertEquals(1, rid); Message msg3 = MessagesQueries.getMessage(jdbc, mid2); - assertEquals(1, msg3.Replies); + assertEquals(1, msg3.getReplies()); assertEquals("weather", msg3.getTags().get(0).getName()); assertEquals(ugnich.getUid(), UserQueries.checkPassword(jdbc, ugnich.getName(), "x")); assertEquals(-1, UserQueries.checkPassword(jdbc, ugnich.getName(), "xy")); |