import static net.pterodactylus.sone.fcp.FcpInterface.FullAccessRequired.WRITING;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.not;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
assertThat(preferences.getFcpFullAccessRequired(), is(WRITING));
}
+ @Test
+ public void configurationIsLoadedCorrectlyWithCutOffLengthMinusOne() {
+ setupConfiguration();
+ setupIntValue("PostCutOffLength", -1);
+ preferencesLoader.loadFrom(configuration);
+ assertThat(preferences.getPostCutOffLength(), not(is(-1)));
+ }
+
}