diff options
author | Vitaly Takmazov | 2020-10-02 17:53:34 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2020-10-02 17:53:34 +0300 |
commit | a62c1fda358f54bd3e7de9aea94ce63e89e06142 (patch) | |
tree | d6f4734e5150f849ae782ea35812bed139f5d029 /src/test/java/com/juick/server | |
parent | 4eab4c56d571cbd318391c26ccb5b02aa68029e1 (diff) |
Apply fixes from some IDEA code inspections
Diffstat (limited to 'src/test/java/com/juick/server')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 0bc23bf7..00259f8f 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -631,7 +631,7 @@ public class ServerTests { .andExpect(status().isOk()) .andReturn(); List<TagStats> tagsFromApi = jsonMapper.readValue(result.getResponse().getContentAsString(), - new TypeReference<List<TagStats>>() { + new TypeReference<>() { }); TagStats yoStats = tagsFromApi.stream().filter(t -> t.getTag().getName().equals("yo")).findFirst().get(); assertThat(yoStats.getUsageCount(), is(2)); @@ -640,7 +640,7 @@ public class ServerTests { .andExpect(status().isOk()) .andReturn(); List<TagStats> ugnichTagsFromApi = jsonMapper.readValue(result2.getResponse().getContentAsString(), - new TypeReference<List<TagStats>>() { + new TypeReference<>() { }); TagStats yoUgnichStats = ugnichTagsFromApi.stream().filter(t -> t.getTag().getName().equals("yo")).findFirst().get(); assertThat(yoUgnichStats.getUsageCount(), is(1)); @@ -690,7 +690,7 @@ public class ServerTests { .andExpect(status().isOk()) .andReturn(); List<User> users = jsonMapper.readValue(result.getResponse().getContentAsString(), - new TypeReference<List<User>>() { + new TypeReference<>() { }); assertThat(users.size(), is(1)); assertThat(users.get(0).getTokens().size(), is(1)); @@ -1471,7 +1471,7 @@ public class ServerTests { } @Test - public void bannedUserShouldBeShadowedFromRecommendationsList() throws IOException { + public void bannedUserShouldBeShadowedFromRecommendationsList() { jdbcTemplate.execute("DELETE FROM bl_users"); User ermine = userService.createUser("ermine", "secret").orElseThrow(IllegalStateException::new); User monstreek = userService.createUser("monstreek", "secret").orElseThrow(IllegalStateException::new); |