Package org.ff4j

Examples of org.ff4j.FF4j.autoCreate()


            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")) {}

    }
View Full Code Here


    @Test
    public void testInitConstructor3() {
        FF4j f3 = new FF4j();
        f3.setAuthorizationsManager(mock(AuthorizationsManager.class));
        f3.autoCreate(true);

        testingGeneratedFF4j(f3);
        Assert.assertNotNull(f3.getAuthorizationsManager());
    }
View Full Code Here

    // 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"));
    }
View Full Code Here

    // 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"));
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.