Explicitely set initial state of FCP interface.
[Sone.git] / 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();