From: David ‘Bombe’ Roden Date: Mon, 24 Aug 2015 04:32:54 +0000 (+0200) Subject: Clean up duplicate test X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=91d4989b0414df35d2a3e8b7507931e36667725b;p=jFCPlib.git Clean up duplicate test --- diff --git a/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java b/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java index e454798..32837dd 100644 --- a/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java +++ b/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java @@ -107,30 +107,6 @@ public class DefaultFcpClientTest { ); } - @Test - public void clientGetCanDownloadData() throws InterruptedException, ExecutionException, IOException { - Future> dataFuture = fcpClient.clientGet().uri("KSK@foo.txt").execute(); - connectNode(); - List lines = fcpServer.collectUntil(is("EndMessage")); - assertThat(lines, matchesFcpMessage("ClientGet", "ReturnType=direct", "URI=KSK@foo.txt")); - String identifier = extractIdentifier(lines); - fcpServer.writeLine( - "AllData", - "Identifier=" + identifier, - "DataLength=6", - "StartupTime=1435610539000", - "CompletionTime=1435610540000", - "Metadata.ContentType=text/plain;charset=utf-8", - "Data", - "Hello" - ); - Optional data = dataFuture.get(); - assertThat(data.get().getMimeType(), is("text/plain;charset=utf-8")); - assertThat(data.get().size(), is(6L)); - assertThat(ByteStreams.toByteArray(data.get().getInputStream()), - is("Hello\n".getBytes(StandardCharsets.UTF_8))); - } - private String extractIdentifier(List lines) { return lines.stream() .filter(s -> s.startsWith("Identifier="))