From a09c7dc8182d6238b8e635d0da96ed19b3ca87bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 24 Aug 2015 06:33:06 +0200 Subject: [PATCH] Improve ClientGet tests --- src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); -- 2.7.4