Examples of FF4j


Examples of org.ff4j.FF4j

        testingGeneratedFF4j(f2);
    }

    @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

Examples of org.ff4j.FF4j

public class ReleaseDateFlipStrategyTest extends AbstractFf4jTest {

    /** {@inheritDoc} */
    @Override
    public FF4j initFF4j() {
        return new FF4j("test-releaseDateStrategyTest-ok.xml");
    }
View Full Code Here

Examples of org.ff4j.FF4j

*/
public class FF4jTest extends AbstractFf4jTest {

    @Override
    public FF4j initFF4j() {
        return new FF4j("ff4j.xml");
    }
View Full Code Here

Examples of org.ff4j.FF4j

    @Test
    public void autoCreateFeatureEnableTest() {

        // Default : store = inMemory, load features from ff4j.xml file
        FF4j ff4j = new FF4j("ff4j.xml");
        ff4j.setAutocreate(true);
        assertFalse(ff4j.exist("autoCreatedFeature"));

        // Auto creation by testing its value
        assertFalse(ff4j.check("autoCreatedFeature"));

        // Assertion
        assertTrue(ff4j.exist("autoCreatedFeature"));
    }
View Full Code Here

Examples of org.ff4j.FF4j

    @Test
    public void workingWithFeature() {

        // Initialize with empty store
        FF4j ff4j = new FF4j();

        // Dynamically register new features
        ff4j.create("f1").enable("f1");

        // Assertions
        assertTrue(ff4j.exist("f1"));
        assertTrue(ff4j.check("f1"));
    }
View Full Code Here

Examples of org.ff4j.FF4j

    /** {@inheritDoc} */
    @Override
    public FF4j initFF4j() {
        // TOTO initialization through Java CODE ?
        return new FF4j("test-ponderationStrategy-ok.xml");
    }
View Full Code Here

Examples of org.ff4j.FF4j

        Assert.assertTrue("both result occured", nbOK > 0 && nbKO > 0);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testKOParameter() {
        new FF4j("test-ponderationStrategy-ko.xml");
    }
View Full Code Here

Examples of org.ff4j.FF4j

    // 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

Examples of org.ff4j.FF4j

    // 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

Examples of org.ff4j.FF4j

        Assert.assertFalse(ff4j.check("newffff"));
    }

    @Test(expected = FeatureNotFoundException.class)
    public void testDisableFeatureNotExist() {
        FF4j ff4j = new FF4j();
        ff4j.disable("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.