this.entryPoint.attach(buildContext);
}
@Test
public void testQueryTerminalNode() {
final ClassObjectType queryObjectType = new ClassObjectType( DroolsQuery.class );
final ObjectTypeNode queryObjectTypeNode = new ObjectTypeNode( this.buildContext.getNextId(),
this.entryPoint,
queryObjectType,
buildContext );
queryObjectTypeNode.attach(buildContext);
ClassFieldReader extractor = store.getReader(DroolsQuery.class,
"name",
DroolsQuery.class.getClassLoader());
MvelConstraint constraint = new MvelConstraintTestUtil( "name == \"query-1\"",
FieldFactory.getInstance().getFieldValue( "query-1" ),
extractor );
AlphaNode alphaNode = new AlphaNode( this.buildContext.getNextId(),
constraint,
queryObjectTypeNode,
buildContext );
alphaNode.attach(buildContext);
final LeftInputAdapterNode liaNode = new LeftInputAdapterNode( this.buildContext.getNextId(),
alphaNode,
this.buildContext );
liaNode.attach(buildContext);
final ClassObjectType cheeseObjectType = new ClassObjectType( Cheese.class );
final ObjectTypeNode cheeseObjectTypeNode = new ObjectTypeNode( this.buildContext.getNextId(),
this.entryPoint,
cheeseObjectType,
buildContext );
cheeseObjectTypeNode.attach(buildContext);