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

Examples of com.volantis.mcs.expression.functions.diselect.DIScanFunction


     * Verify that when the default value is invalid, the function evaluates to
     * 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


     * Verify that when no value can be retrieved from the repository and no
     * 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

     * Verify that when no value can be retrieved from the repository and the
     * 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

Related Classes of com.volantis.mcs.expression.functions.diselect.DIScanFunction

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.