Package com.volantis.xml.expression

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


                   value instanceof StringValue);

        // check the StringValues string
        assertEquals("Unexpected StringValue value",
                     policyValue,
                     value.stringValue().asJavaString());
    }

    /**
     * Test the getPolicyValue() function with a policy that has NO value
     * @throws Exception if an error occurs
View Full Code Here


                   result instanceof StringValue);

        // check the StringValues string
        assertEquals("Unexpected StringValue value",
                     "a_string",
                     result.stringValue().asJavaString());
    }

     /**
     * Test the getCharacteristic() function with a characteristic that has
     * a value
View Full Code Here

                        DevicePolicyValueAccessor.class);


        if (policyAccessor != null) {
            Value deviceValue = values[0];
            String deviceName = deviceValue.stringValue().asJavaString();

            deviceRelationship = policyAccessor.getRelationshipTo(deviceName);
        }

        // allow sublcasses to process the relationship
View Full Code Here

        Value result = expression.evaluate(expressionContext);

        Assert.assertEquals("Result not as",
                     "value",
                     result.stringValue().asJavaString());
    }
}


/*
 
View Full Code Here

                    if (value instanceof FormatReferenceValue) {
                        ref = ((FormatReferenceValue)value).
                                asFormatReference();
                    } else {
                        formatRef = value.stringValue().asJavaString();
                    }
                }
            } catch (ExpressionException e) {
                logger.error("unexpected-exception");
            }
View Full Code Here

        Assert.assertTrue("Result not a sequence",
                   result instanceof Sequence);

        Assert.assertEquals("Result not as",
                     "value other",
                     result.stringValue().asJavaString());
    }

    /**
     * Ensure that multiple values can be accessed via the [number] predicate
     * @throws Exception if an error occurs
View Full Code Here

        Assert.assertTrue("Result not a sequence",
                   result instanceof Sequence);

        Assert.assertEquals("Result not as",
                     "another value",
                     result.stringValue().asJavaString());

    }
}

View Full Code Here

        Value result = expression.evaluate(expressionContext);

        assertEquals("Result not as",
                     "value",
                     result.stringValue().asJavaString());
    }

    /**
     * Test invoke with a missing entity and a numeric default.
     * @throws Exception
View Full Code Here

        Value result = expression.evaluate(expressionContext);

        assertEquals("Result not as",
                     "2", // Numerics represent as floating
                     result.stringValue().asJavaString());
    }

    /**
     * Test invoke with an existing entity and a default. The
     * existing entity should be used thus ignoring the default.
View Full Code Here

        Value result = expression.evaluate(expressionContext);

        assertEquals("Result not as",
                     "value",
                     result.stringValue().asJavaString());
    }

    /**
     * Test that the function can be evaluated with a [1] predicate
     * @throws Exception if an error occurs
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.