6667686970717273747576
if (ff4j.check("do-not-exit")) {} } catch (FeatureNotFoundException fnfe) { // System.out.println(fnfe.getMessage()); } ff4j.autoCreate(true); // no more exception but returning false if (ff4j.check("do-not-exit")) {} }
6263646566676869707172
@Test public void testInitConstructor3() { FF4j f3 = new FF4j(); f3.setAuthorizationsManager(mock(AuthorizationsManager.class)); f3.autoCreate(true); testingGeneratedFF4j(f3); Assert.assertNotNull(f3.getAuthorizationsManager()); }
979899100101102103104105106107
// enabling... @Test public void testEnableFeature() { FF4j ff4j = new FF4j(); ff4j.autoCreate(true); ff4j.enable("newffff"); Assert.assertTrue(ff4j.exist("newffff")); Assert.assertTrue(ff4j.check("newffff")); }
113114115116117118119120121122123
// disabling... @Test public void testDisableFeature() { FF4j ff4j = new FF4j(); ff4j.autoCreate(true); ff4j.disable("newffff"); Assert.assertTrue(ff4j.exist("newffff")); Assert.assertFalse(ff4j.check("newffff")); }