use of org.drools.workbench.models.datamodel.rule.ExpressionGlobalVariable in project drools by kiegroup.
the class CopyExpressionVisitor method visit.
public void visit(ExpressionGlobalVariable part) {
add(new ExpressionGlobalVariable(part.getName(), part.getClassType(), part.getGenericType(), part.getParametricType()));
moveNext(part);
}
use of org.drools.workbench.models.datamodel.rule.ExpressionGlobalVariable in project drools by kiegroup.
the class CopyExpressionVisitorTest method testExpressionFormLineCopy.
@Test
public void testExpressionFormLineCopy() {
ExpressionFormLine efl = new ExpressionFormLine();
efl.appendPart(new ExpressionCollection("collection", "CT", "GT", "PT"));
efl.appendPart(new ExpressionCollectionIndex("collectionIndex", "CT", "GT"));
efl.appendPart(new ExpressionField("field", "CT", "FT", "PT"));
efl.appendPart(new ExpressionFieldVariable("fieldVariable", "Type"));
efl.appendPart(new ExpressionGlobalVariable("globalVariable", "CT", "GT", "PT"));
efl.appendPart(new ExpressionMethod("method", "CT", "GT"));
efl.appendPart(new ExpressionMethodParameter("methodParam", "CT", "GT"));
efl.appendPart(new ExpressionText("text"));
efl.appendPart(new ExpressionUnboundFact("FactType"));
efl.appendPart(new ExpressionVariable("binding", "FactType"));
// verify that the new instance created with copy constructor is equal to original
assertEquals(efl, new ExpressionFormLine(efl));
}
Aggregations