assertNotNull( variables0 );
assertEquals( 2,
variables0.size() );
ValueHolder v0vh0 = variables0.get( 0 );
assertNotNull( v0vh0 );
assertEquals( "AIF0F0",
v0vh0.getFieldName() );
assertEquals( "AIF0F0Value",
v0vh0.getValue() );
assertEquals( ValueHolder.Type.TEMPLATE_KEY,
v0vh0.getType() );
ValueHolder v0vh1 = variables0.get( 1 );
assertNotNull( v0vh1 );
assertEquals( "AIF0F1",
v0vh1.getFieldName() );
assertEquals( "AIF0F1Value",
v0vh1.getValue() );
assertEquals( ValueHolder.Type.TEMPLATE_KEY,
v0vh1.getType() );
//Test second pattern, with one Template Key and one Literal
RuleModelPeerVariableVisitor visitor1 = new RuleModelPeerVariableVisitor( model,
"AIF1F0Value" );
List<ValueHolder> variables1 = visitor1.getPeerVariables();
assertNotNull( variables1 );
assertEquals( 2,
variables1.size() );
ValueHolder v1vh0 = variables1.get( 0 );
assertNotNull( v1vh0 );
assertEquals( "AIF1F0",
v1vh0.getFieldName() );
assertEquals( "AIF1F0Value",
v1vh0.getValue() );
assertEquals( ValueHolder.Type.TEMPLATE_KEY,
v1vh0.getType() );
ValueHolder v1vh1 = variables1.get( 1 );
assertNotNull( v1vh1 );
assertEquals( "AIF1F1",
v1vh1.getFieldName() );
assertEquals( "AIF1F1Value",
v1vh1.getValue() );
assertEquals( ValueHolder.Type.VALUE,
v1vh1.getType() );
}