Search in sources :

Example 6 with ContextNode

use of org.kie.dmn.feel.lang.ast.ContextNode in project drools by kiegroup.

the class FEELParserTest method testEmptyContext.

@Test
public void testEmptyContext() {
    String inputExpression = "{}";
    BaseNode context = parse(inputExpression);
    assertThat(context, is(instanceOf(ContextNode.class)));
    assertThat(context.getText(), is(inputExpression));
    ContextNode ctx = (ContextNode) context;
    assertThat(ctx.getEntries(), is(empty()));
}
Also used : IterationContextNode(org.kie.dmn.feel.lang.ast.IterationContextNode) ContextNode(org.kie.dmn.feel.lang.ast.ContextNode) BaseNode(org.kie.dmn.feel.lang.ast.BaseNode) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 BaseNode (org.kie.dmn.feel.lang.ast.BaseNode)6 ContextNode (org.kie.dmn.feel.lang.ast.ContextNode)6 IterationContextNode (org.kie.dmn.feel.lang.ast.IterationContextNode)6 ContextEntryNode (org.kie.dmn.feel.lang.ast.ContextEntryNode)5 NameDefNode (org.kie.dmn.feel.lang.ast.NameDefNode)5 FunctionDefNode (org.kie.dmn.feel.lang.ast.FunctionDefNode)2 QualifiedNameNode (org.kie.dmn.feel.lang.ast.QualifiedNameNode)1