use of org.xwiki.notifications.filters.expression.EntityReferenceNode in project xwiki-platform by xwiki.
the class ExpressionNodeToHQLConverterTest method parseEntityReferenceNode.
@Test
public void parseEntityReferenceNode() {
DocumentReference documentReference = new DocumentReference("xwiki", "Main", "WebHome");
when(serializer.serialize(documentReference)).thenReturn("xwiki:Main.WebHome");
AbstractNode testAST = new EntityReferenceNode(documentReference);
ExpressionNodeToHQLConverter.HQLQuery result = parser.parse(testAST);
assertEquals(":entity_e9f8294b0de086574bed923c45695bc8afc27d3ede9c35ed44db8d2100929de4", result.getQuery());
assertEquals("xwiki:Main.WebHome", result.getQueryParameters().get("entity_e9f8294b0de086574bed923c45695bc8afc27d3ede9c35ed44db8d2100929de4"));
}
Aggregations