Package com.volantis.styling.expressions

Examples of com.volantis.styling.expressions.StylingFunction.evaluate()


        // =====================================================================

        List functionArgs = new ArrayList();
        functionArgs.add(getCounterIdentifier("cow"));
        StyleValue functionValue =
                function.evaluate(evaluationContextMock,
                        "counter", functionArgs);

        assertNotNull("Function should return a value", functionValue);
        assertTrue("Function should return a StyleInteger",
                functionValue instanceof StyleInteger);
View Full Code Here


        List functionArgs = new ArrayList();
        functionArgs.add(getCounterIdentifier("hippopotamus"));
        functionArgs.add(ListStyleTypeKeywords.LOWER_ALPHA);

        StyleValue functionValue =
                function.evaluate(evaluationContextMock,
                        "counter", functionArgs);

        assertNotNull("Function should return a value", functionValue);
        assertTrue("Function should return a StyleString",
                functionValue instanceof StyleString);
View Full Code Here

        List functionArgs = new ArrayList();
        functionArgs.add(getCounterIdentifier("hippopotamus"));
        functionArgs.add(ListStyleTypeKeywords.LOWER_ALPHA);

        StyleValue functionValue =
                function.evaluate(evaluationContextMock,
                        "counter", functionArgs);
        assertSame(result, functionValue);
    }
}
View Full Code Here

        List functionArgs = new ArrayList();
        functionArgs.add(getCounterIdentifier("horse"));
        functionArgs.add(STYLE_VALUE_FACTORY.getString(null, "."));
        functionArgs.add(ListStyleTypeKeywords.DECIMAL);
        StyleValue functionValue =
                function.evaluate(evaluationContextMock,
                        "counters", functionArgs);

        assertNotNull("Function should return a value", functionValue);
        assertTrue("Function should return a StyleString",
                functionValue instanceof StyleString);
View Full Code Here

        List functionArgs = new ArrayList();
        functionArgs.add(getCounterIdentifier("cow"));
        functionArgs.add(STYLE_VALUE_FACTORY.getString(null, "."));
        functionArgs.add(ListStyleTypeKeywords.DECIMAL);
        StyleValue functionValue =
                function.evaluate(evaluationContextMock,
                        "counters", functionArgs);

        assertNotNull("Function should return a value", functionValue);
        assertTrue("Function should return a StyleString",
                functionValue instanceof StyleString);
View Full Code Here

        functionArgs.add(getCounterIdentifier("hippopotamus"));
        functionArgs.add(STYLE_VALUE_FACTORY.getString(null, "."));
        functionArgs.add(ListStyleTypeKeywords.LOWER_ALPHA);

        StyleValue functionValue =
                function.evaluate(evaluationContextMock,
                        "counter", functionArgs);
        StyleString expected = STYLE_VALUE_FACTORY.getString(null, "0.A.B.C");
        assertEquals(expected, functionValue);
    }
}
View Full Code Here

            STYLE_VALUE_FACTORY.getInteger(null, 2),
        });

        StylingFunction function = new MCSContainerInstanceFunction();
        StyleFormatReference referenceValue = (StyleFormatReference)
                function.evaluate(evaluationContextMock, "foo", arguments);
        FormatReference reference = referenceValue.getReference();
        assertEquals("Reference", formatReferenceMock, reference);
    }
}
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.