diff options
author | Vitaly Takmazov | 2018-11-29 16:34:30 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-11-29 16:34:30 +0300 |
commit | 30d33cf40047cd7a9a6d77f02bcab3cc44bffffb (patch) | |
tree | 2443be370b4b71ab0ef9eddb700b0ccc8b0c3695 /src/test/java/com/juick/server/tests | |
parent | 3feb0307d778c6ceb6b3805587f539fe96a3eb34 (diff) |
Fix test issues
Diffstat (limited to 'src/test/java/com/juick/server/tests')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 3e4fe539..41fbe434 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -1197,7 +1197,7 @@ public class ServerTests { @Test public void JpegFromJuickUriShouldBeProcessedCorrectly() throws Exception { Path tmpFile = Paths.get(tmpDir, "2915104.jpg"); - Files.copy(Paths.get(ClassLoader.getSystemResource("2915104.jpg").toURI()), tmpFile, StandardCopyOption.REPLACE_EXISTING); + Files.copy(Paths.get(new ClassPathResource("2915104.jpg").getURI()), tmpFile, StandardCopyOption.REPLACE_EXISTING); assertThat(tmpFile.toFile().exists(), is(true)); CommandResult postJpgiPhone = commandsManager.processCommand(ugnich, "YO", URI.create("juick://2915104.jpg")); assertThat(postJpgiPhone.getNewMessage().isPresent(), is(true)); @@ -1215,7 +1215,7 @@ public class ServerTests { public void changeExtensionWhenReceiveFileWithWrongContentType() throws Exception { Path pngOutput = Paths.get(tmpDir, "cmyk.png"); Files.deleteIfExists(pngOutput); - Files.copy(getClass().getClassLoader().getResourceAsStream("cmyk.jpg"), pngOutput); + Files.copy(Paths.get(new ClassPathResource("cmyk.jpg").getURI()), pngOutput); assertThat(pngOutput.toFile().exists(), is(true)); CommandResult postJpgCmyk = commandsManager.processCommand(ugnich, "YO", pngOutput.toUri()); assertThat(postJpgCmyk.getNewMessage().isPresent(), is(true)); |