Package org.ff4j.strategy.el

Examples of org.ff4j.strategy.el.ExpressionFlipStrategy.evaluate()


    @Test
    public void testExplicitevaluate() {
        ExpressionFlipStrategy efs = new ExpressionFlipStrategy();

        Assert.assertTrue(efs.evaluate("D", ff4j.getStore(), null));
        Assert.assertTrue(efs.evaluate("TOTO", ff4j.getStore(), null));

        FlippingExecutionContext fex = new FlippingExecutionContext();
        fex.putString(ExpressionFlipStrategy.PARAM_EXPRESSION, "D");
        Assert.assertTrue(efs.evaluate("D", ff4j.getStore(), fex));
View Full Code Here


    @Test
    public void testExplicitevaluate() {
        ExpressionFlipStrategy efs = new ExpressionFlipStrategy();

        Assert.assertTrue(efs.evaluate("D", ff4j.getStore(), null));
        Assert.assertTrue(efs.evaluate("TOTO", ff4j.getStore(), null));

        FlippingExecutionContext fex = new FlippingExecutionContext();
        fex.putString(ExpressionFlipStrategy.PARAM_EXPRESSION, "D");
        Assert.assertTrue(efs.evaluate("D", ff4j.getStore(), fex));
View Full Code Here

        Assert.assertTrue(efs.evaluate("D", ff4j.getStore(), null));
        Assert.assertTrue(efs.evaluate("TOTO", ff4j.getStore(), null));

        FlippingExecutionContext fex = new FlippingExecutionContext();
        fex.putString(ExpressionFlipStrategy.PARAM_EXPRESSION, "D");
        Assert.assertTrue(efs.evaluate("D", ff4j.getStore(), fex));

        fex.putString(ExpressionFlipStrategy.PARAM_EXPRESSION, "TOTO");
        Assert.assertFalse(efs.evaluate("D", ff4j.getStore(), fex));
    }
View Full Code Here

        FlippingExecutionContext fex = new FlippingExecutionContext();
        fex.putString(ExpressionFlipStrategy.PARAM_EXPRESSION, "D");
        Assert.assertTrue(efs.evaluate("D", ff4j.getStore(), fex));

        fex.putString(ExpressionFlipStrategy.PARAM_EXPRESSION, "TOTO");
        Assert.assertFalse(efs.evaluate("D", ff4j.getStore(), fex));
    }

}
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.