From 83e875756e1a2afdcedba937734500ef1e452069 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 26 Oct 2013 14:54:48 +0200 Subject: [PATCH] Add method to add a command for testing. --- src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java b/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java index 02d84cc..0b0dcb9 100644 --- a/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java +++ b/src/main/java/net/pterodactylus/sone/fcp/FcpInterface.java @@ -39,6 +39,7 @@ import freenet.pluginmanager.PluginReplySender; import freenet.support.SimpleFieldSet; import freenet.support.api.Bucket; +import com.google.common.annotations.VisibleForTesting; /** * Implementation of an FCP interface for other clients or plugins to * communicate with Sone. @@ -106,6 +107,11 @@ public class FcpInterface { // ACCESSORS // + @VisibleForTesting + void addCommand(String name, AbstractSoneCommand command) { + commands.put(name, command); + } + /** * Sets whether the FCP interface should handle requests. If {@code active} * is {@code false}, all requests are answered with an error. -- 2.7.4