use of org.drools.workbench.models.datamodel.rule.ExpressionCollectionIndex in project drools by kiegroup.
the class CopyExpressionVisitor method visit.
public void visit(ExpressionCollectionIndex part) {
ExpressionCollectionIndex method = new ExpressionCollectionIndex(part.getName(), part.getClassType(), part.getGenericType(), part.getParametricType());
copyMethodParams(part, method);
add(method);
moveNext(part);
}
use of org.drools.workbench.models.datamodel.rule.ExpressionCollectionIndex 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));
}
use of org.drools.workbench.models.datamodel.rule.ExpressionCollectionIndex in project drools-wb by kiegroup.
the class RuleModelCloneVisitorTest method buildExpressionFormLine.
private static ExpressionFormLine buildExpressionFormLine() {
ExpressionFormLine efl = new ExpressionFormLine();
efl.setBinding("eflBinding");
efl.appendPart(new ExpressionText("text"));
efl.appendPart(new ExpressionCollectionIndex("collectionIndex", "CT", "GT"));
return efl;
}
Aggregations