Package com.volantis.mcs.expression.functions.diselect

Examples of com.volantis.mcs.expression.functions.diselect.DIScanFunction.execute()


     * an empty string.
     */
    public void testExecuteWithInvalidDefaultValue() {

        DIScanFunction function = new DIScanFunction();
        Value result = function.execute(exprContext, accessorMock,
                INVALID_DEFAULT);
        // expect the result to be "" because default value was wrong type
        assertTrue(result instanceof StringValue);
        assertEquals(EMPTY_VALUE, ((StringValue)result).asJavaString());
    }
View Full Code Here


     * default value is specifed, the function evaluates to an empty string.
     */
    public void testExecuteWithNoDefaultValue() {

        DIScanFunction function = new DIScanFunction();
        Value result = function.execute(exprContext, accessorMock, null);
        // expect the result to be "" because default value was null
        assertTrue(result instanceof StringValue);
        assertEquals(EMPTY_VALUE, ((StringValue)result).asJavaString());
    }

View Full Code Here

     * default value is valid, the function evaluates to the default value.
     */
    public void testExecuteWithValidDefaultValue() {

        DIScanFunction function = new DIScanFunction();
        Value result = function.execute(exprContext, accessorMock,
                VALID_DEFAULT);
        // expect the result to be the default value
        assertTrue(result instanceof StringValue);
        assertEquals(VALID_DEFAULT.asJavaString(),
                ((StringValue)result).asJavaString());
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.