diff options
author | Vitaly Takmazov | 2018-12-20 00:36:16 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-12-20 00:36:16 +0300 |
commit | ecf4b707f74298618d019bb8108c25f8fc5ad4c6 (patch) | |
tree | 22c3052aa8a83bef06a30f31573adbd3af21befd /src/test | |
parent | b19902c0f390d9d0122db33d5161a2263a2de26f (diff) |
getMyFeed optimization
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 5902220f..32afd4f9 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -1041,8 +1041,8 @@ public class ServerTests { tagService.updateTags(newMid, Collections.singletonList(banned)); assertThat(messagesService.getMessage(newMid).get().getTags().size(), is(0)); privacyQueriesService.blacklistUser(freefd, userService.getUserByUID(newUid).orElse(AnonymousUser.INSTANCE)); - assertTrue(messagesService.getMessages(AnonymousUser.INSTANCE, messagesService.getMyFeed(freefd.getUid(), 0, true)) - .stream().noneMatch(m -> m.getMid() == newMid)); + assertTrue(messagesService.getMyFeed(freefd.getUid(), 0, true) + .stream().noneMatch(m -> m == newMid)); } @Test public void tagsShouldBeDeserializedFromXml() throws JAXBException { @@ -1093,7 +1093,7 @@ public class ServerTests { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); - Document doc = db.parse(new ByteArrayInputStream(sw.toString().getBytes(CharEncoding.UTF_8))); + Document doc = db.parse(new ByteArrayInputStream(sw.toString().getBytes(StandardCharsets.UTF_8))); Node juickNode = doc.getDocumentElement(); NamedNodeMap attrs = juickNode.getAttributes(); assertEquals("date should be in ts field", DateFormattersHolder.getMessageFormatterInstance().format(currentDate), |