Package org.ff4j.strategy

Examples of org.ff4j.strategy.ServerFilterStrategy


    @Test
    public void testFilterOK() throws ParseException {
        // Given
        Feature f1 = ff4j.getFeature(F1);
        Assert.assertNotNull(f1.getFlippingStrategy());
        ServerFilterStrategy cStra = (ServerFilterStrategy) f1.getFlippingStrategy();
        Assert.assertNotNull(cStra.getInitParams());
        Assert.assertEquals(1, cStra.getInitParams().size());
        Assert.assertTrue(f1.isEnable());

        // When (add correct client name)
        FlippingExecutionContext fex = new FlippingExecutionContext();
        fex.addValue(ServerFilterStrategy.SERVER_HOSTNAME, "dev01");
View Full Code Here


    @Test
    public void testFilterInvalidClient() throws ParseException {
        // Given
        Feature f1 = ff4j.getFeature(F1);
        Assert.assertNotNull(f1.getFlippingStrategy());
        ServerFilterStrategy cStra = (ServerFilterStrategy) f1.getFlippingStrategy();
        Assert.assertNotNull(cStra.getInitParams());
        Assert.assertEquals(1, cStra.getInitParams().size());
        Assert.assertTrue(f1.isEnable());

        // When (add invalid client name)
        FlippingExecutionContext fex = new FlippingExecutionContext();
        fex.addValue(ServerFilterStrategy.SERVER_HOSTNAME, FEATURE_NEW);
View Full Code Here

TOP

Related Classes of org.ff4j.strategy.ServerFilterStrategy

Copyright © 2018 www.massapicom. 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.