Examples of FF4j


Examples of org.ff4j.FF4j

    protected FeatureStore defaultStore = new InMemoryFeatureStore(TEST_FEATURES_FILE);

    /** {@inheritDoc} */
    @Before
    public void setUp() throws Exception {
        ff4j = new FF4j();
        ff4j.setStore(initStore());
        testedStore = ff4j.getStore();
        assertFf4j = new AssertFf4j(ff4j);
    }
View Full Code Here

Examples of org.ff4j.FF4j

    protected AssertFf4j assertFf4j;

    /** {@inheritDoc} */
    @Before
    public void setUp() throws Exception {
        ff4j = new FF4j();
        ff4j.setStore(initStore());
        testedStore = ff4j.getStore();
        assertFf4j = new AssertFf4j(ff4j);
    }
View Full Code Here

Examples of org.ff4j.FF4j

        token.setDetails(u1);
        context.setAuthentication(token);
        SecurityContextHolder.setContext(context);
        // <--

        ff4j = new FF4j("test-ff4j-security-spring.xml");
        ff4j.setAuthorizationsManager(new SpringSecurityAuthorisationManager());
    }
View Full Code Here

Examples of org.ff4j.FF4j

        token.setDetails(u1);
        context.setAuthentication(token);
        SecurityContextHolder.setContext(context);
        // <--

        ff4j = new FF4j("test-ff4j-security-spring.xml");
        ff4j.setAuthorizationsManager(new SpringSecurityAuthorisationManager());
    }
View Full Code Here

Examples of org.ff4j.FF4j

    private FF4j ff4j;

    @Test
    public void helloWorld() {

        ff4j = new FF4j("ff4j.xml").autoCreate(true);

        // ff4j initialization.....

        if (ff4j.check("sayHello")) {
            // Enhanced Behaviour
View Full Code Here

Examples of org.ff4j.FF4j

    }

    @Test
    public void helloWorld2() {

        FF4j ff4j = new FF4j("ff4j.xml");

        // Work with it
        if (ff4j.check("AwesomeFeature")) {
            // System.out.println("Hello the feature is enabled");
        }

        // Its does not exist
        try {
            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

Examples of org.ff4j.FF4j

*/
public class ClientFilterStrategyTest extends AbstractFf4jTest {

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

Examples of org.ff4j.FF4j

        Assert.assertFalse(f.check("new"));
    }

    @Test
    public void testInitConstructor1() {
        FF4j f1 = new FF4j();
        f1.setAutocreate(true);
        testingGeneratedFF4j(f1);
    }
View Full Code Here

Examples of org.ff4j.FF4j

        testingGeneratedFF4j(f1);
    }

    @Test
    public void testInitConstructor2() {
        FF4j f2 = new FF4j();
        f2.setAutocreate(true);
        testingGeneratedFF4j(f2);
    }
View Full Code Here

Examples of org.ff4j.FF4j

public class AuthorizationManagementTest extends AbstractFf4jTest {

    /** {@inheritDoc} */
    @Override
    public FF4j initFF4j() {
        FF4j ff4j = new FF4j();
        ff4j.setAuthorizationsManager(mockAuthManager);
        return ff4j;
    }
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.