Explicitely set initial state of FCP interface.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 26 Oct 2013 13:02:48 +0000 (15:02 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 28 Feb 2014 21:25:46 +0000 (22:25 +0100)
src/test/java/net/pterodactylus/sone/fcp/FcpInterfaceTest.java

index 6648d12..8fd09c1 100644 (file)
@@ -20,6 +20,7 @@ package net.pterodactylus.sone.fcp;
 import static freenet.pluginmanager.FredPluginFCP.ACCESS_DIRECT;
 import static freenet.pluginmanager.FredPluginFCP.ACCESS_FCP_FULL;
 import static freenet.pluginmanager.FredPluginFCP.ACCESS_FCP_RESTRICTED;
+import static net.pterodactylus.sone.fcp.FcpInterface.FullAccessRequired.ALWAYS;
 import static net.pterodactylus.sone.fcp.FcpInterface.FullAccessRequired.NO;
 import static net.pterodactylus.sone.fcp.FcpInterface.FullAccessRequired.WRITING;
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -59,6 +60,11 @@ public class FcpInterfaceTest {
        private final FcpInterface fcpInterface = new FcpInterface(core);
        private final CapturingPluginReplySender pluginReplySender = new CapturingPluginReplySender();
 
+       public FcpInterfaceTest() {
+               fcpInterface.setActive(false);
+               fcpInterface.setFullAccessRequired(ALWAYS);
+       }
+
        @Test
        public void testThatAnInactiveFcpInterfaceReturnsAnErrorForDirectAccess() throws PluginNotFoundException {
                SimpleFieldSet fieldSet = new SimpleFieldSetBuilder().get();