Package com.volantis.xml.expression

Examples of com.volantis.xml.expression.Value.stringValue()


        Value result = expression.evaluate(expressionContext);

        // ensure that the correct value was returned
        assertEquals("Unexpected value returned",
                     "value",
                     result.stringValue().asJavaString());
    }

    /**
     * Test that the function returns the default argument when a [1] predicate
     * is specified and no name value pair has been added to the request
View Full Code Here


        Value result = expression.evaluate(expressionContext);

        // ensure that the correct value was returned
        assertEquals("Unexpected value returned",
                     "default",
                     result.stringValue().asJavaString());
    }

    /**
     * Test that the function returns an empty sequence when a [2] predicate
     * is specified
View Full Code Here

        accessorMock.expects.getDeviceName().returns("device-name");

        Function function = new GetDeviceNameFunction();
        Value value = function.invoke(expressionContextMock,
                                      EMPTY_VALUE_ARRAY);
        String name = value.stringValue().asJavaString();
        assertNotNull(name);
        assertEquals("device-name",
                     name);
    }
}
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.