use of com.evolveum.midpoint.xml.ns._public.common.common_3.ConstExpressionEvaluatorType in project midpoint by Evolveum.
the class TestParseMappingConst method assertPrismPropertyValueLocal.
@Override
protected void assertPrismPropertyValueLocal(PrismPropertyValue<MappingType> value) throws SchemaException {
MappingType mappingType = value.getValue();
ExpressionType expressionType = mappingType.getExpression();
List<JAXBElement<?>> expressionEvaluatorElements = expressionType.getExpressionEvaluator();
assertEquals("Wrong number of expression evaluator elemenets", 1, expressionEvaluatorElements.size());
JAXBElement<?> expressionEvaluatorElement = expressionEvaluatorElements.get(0);
Object evaluatorElementObject = expressionEvaluatorElement.getValue();
if (!(evaluatorElementObject instanceof ConstExpressionEvaluatorType)) {
AssertJUnit.fail("Const expression is of type " + evaluatorElementObject.getClass().getName());
}
ConstExpressionEvaluatorType constExpressionEvaluatorType = (ConstExpressionEvaluatorType) evaluatorElementObject;
System.out.println("ConstExpressionEvaluatorType: " + constExpressionEvaluatorType);
assertEquals("Wrong value in const evaluator", "foo", constExpressionEvaluatorType.getValue());
}
Aggregations