From 70d6fa86966eafa1e898c0df0837afff02df6cdb Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 14 Oct 2015 20:57:03 +0200 Subject: [PATCH] Use method references instead of lambda expressions --- .../pterodactylus/fcp/quelaton/DefaultFcpClientTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java b/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java index 876434f..d4001ba 100644 --- a/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java +++ b/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java @@ -1305,7 +1305,7 @@ public class DefaultFcpClientTest { @Test public void reloadingPluginWorks() throws InterruptedException, ExecutionException, IOException { Future> pluginInfo = fcpClient.reloadPlugin().plugin(CLASS_NAME).execute(); - connectAndAssert(() -> matchReloadPluginMessage()); + connectAndAssert(this::matchReloadPluginMessage); replyWithPluginInfo(); verifyPluginInfo(pluginInfo); } @@ -1355,7 +1355,7 @@ public class DefaultFcpClientTest { @Test public void removingPluginWorks() throws InterruptedException, ExecutionException, IOException { Future pluginRemoved = fcpClient.removePlugin().plugin(CLASS_NAME).execute(); - connectAndAssert(() -> matchPluginRemovedMessage()); + connectAndAssert(this::matchPluginRemovedMessage); replyWithPluginRemoved(); assertThat(pluginRemoved.get(), is(true)); } @@ -1402,7 +1402,7 @@ public class DefaultFcpClientTest { @Test public void gettingPluginInfoWorks() throws InterruptedException, ExecutionException, IOException { Future> pluginInfo = fcpClient.getPluginInfo().plugin(CLASS_NAME).execute(); - connectAndAssert(() -> matchGetPluginInfoMessage()); + connectAndAssert(this::matchGetPluginInfoMessage); replyWithPluginInfo(); verifyPluginInfo(pluginInfo); } @@ -1638,7 +1638,7 @@ public class DefaultFcpClientTest { .uri("KSK@foo.txt") .execute(); connectNode(); - readMessage("Hello", () -> matchesDirectClientPut()); + readMessage("Hello", this::matchesDirectClientPut); } @Test @@ -1649,7 +1649,7 @@ public class DefaultFcpClientTest { .uri("KSK@foo.txt") .execute(); connectNode(); - readMessage("Hello", () -> matchesDirectClientPut()); + readMessage("Hello", this::matchesDirectClientPut); replyWithPutFailed("not-the-right-one"); replyWithPutSuccessful(identifier); assertThat(key.get().get().getKey(), is("KSK@foo.txt")); @@ -1663,7 +1663,7 @@ public class DefaultFcpClientTest { .uri("KSK@foo.txt") .execute(); connectNode(); - readMessage("Hello", () -> matchesDirectClientPut()); + readMessage("Hello", this::matchesDirectClientPut); replyWithPutSuccessful("not-the-right-one"); replyWithPutFailed(identifier); assertThat(key.get().isPresent(), is(false)); @@ -1744,7 +1744,7 @@ public class DefaultFcpClientTest { sendDdaRequired(identifier); readMessage(() -> matchesTestDDARequest(ddaFile)); sendTestDDAReply(ddaFile.getParent(), new File(ddaFile + ".foo")); - readMessage(() -> matchesFailedToReadResponse()); + readMessage(this::matchesFailedToReadResponse); } @Test -- 2.7.4