From: David ‘Bombe’ Roden Date: Sat, 26 Oct 2013 12:54:48 +0000 (+0200) Subject: Add method to add a command for testing. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=83e875756e1a2afdcedba937734500ef1e452069;p=Sone.git Add method to add a command for testing. --- 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.