From: David ‘Bombe’ Roden Date: Mon, 24 Aug 2015 04:33:06 +0000 (+0200) Subject: Improve ClientGet tests X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a09c7dc8182d6238b8e635d0da96ed19b3ca87bd;p=jFCPlib.git Improve ClientGet tests --- diff --git a/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java b/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java index 32837dd..428ee04 100644 --- a/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java +++ b/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java @@ -1866,7 +1866,7 @@ public class DefaultFcpClientTest { @Test public void works() throws InterruptedException, ExecutionException, IOException { Future> dataFuture = fcpClient.clientGet().uri("KSK@foo.txt").execute(); - connectAndAssert(() -> matchesFcpMessage("ClientGet", "URI=KSK@foo.txt")); + connectAndAssert(() -> matchesFcpMessage("ClientGet", "URI=KSK@foo.txt", "ReturnType=direct")); replyWithAllData("not-test", "Hello World", "text/plain;charset=latin-9"); replyWithAllData(identifier, "Hello", "text/plain;charset=utf-8"); Optional data = dataFuture.get(); @@ -1877,6 +1877,7 @@ public class DefaultFcpClientTest { public void getFailedIsRecognized() throws InterruptedException, ExecutionException, IOException { Future> dataFuture = fcpClient.clientGet().uri("KSK@foo.txt").execute(); connectAndAssert(() -> matchesFcpMessage("ClientGet", "URI=KSK@foo.txt")); + replyWithGetFailed("not-test"); replyWithGetFailed(identifier); Optional data = dataFuture.get(); assertThat(data.isPresent(), is(false));