aif.fieldValues[0].nature = BaseSingleFieldConstraint.TYPE_LITERAL;
brlAction.getDefinition().add( aif );
dt.getActionCols().add( brlAction );
BRLRuleModel model = new BRLRuleModel( dt );
assertNotNull( model.getRHSBoundFacts() );
assertEquals( 3,
model.getRHSBoundFacts().size() );
assertTrue( model.getRHSBoundFacts().contains( "$ins" ) );
assertTrue( model.getRHSBoundFacts().contains( "$ins2" ) );
assertTrue( model.getRHSBoundFacts().contains( "$aif" ) );
ActionInsertFact r1 = model.getRHSBoundFact( "$ins" );
assertNotNull( r1 );
assertTrue( r1 instanceof BRLRuleModel.ActionInsertFactCol52ActionInsertFactAdaptor );
BRLRuleModel.ActionInsertFactCol52ActionInsertFactAdaptor raif1 = (BRLRuleModel.ActionInsertFactCol52ActionInsertFactAdaptor) r1;
assertEquals( "Person",
raif1.factType );
assertEquals( "rating",
raif1.fieldValues[0].field );
assertEquals( SuggestionCompletionEngine.TYPE_STRING,
raif1.fieldValues[0].type );
assertNull( raif1.fieldValues[0].value );
assertEquals( BaseSingleFieldConstraint.TYPE_LITERAL,
raif1.fieldValues[0].nature );
ActionInsertFact r2 = model.getRHSBoundFact( "$ins2" );
assertNotNull( r2 );
assertTrue( r2 instanceof BRLRuleModel.ActionInsertFactCol52ActionInsertLogicalFactAdaptor );
BRLRuleModel.ActionInsertFactCol52ActionInsertLogicalFactAdaptor raif2 = (BRLRuleModel.ActionInsertFactCol52ActionInsertLogicalFactAdaptor) r2;
assertEquals( "Person2",
raif2.factType );
assertEquals( "rating2",
raif2.fieldValues[0].field );
assertEquals( SuggestionCompletionEngine.TYPE_STRING,
raif2.fieldValues[0].type );
assertNull( raif2.fieldValues[0].value );
assertEquals( BaseSingleFieldConstraint.TYPE_LITERAL,
raif2.fieldValues[0].nature );
ActionInsertFact r3 = model.getRHSBoundFact( "$aif" );
assertNotNull( r3 );
assertTrue( r3 instanceof ActionInsertFact );
ActionInsertFact raif3 = (ActionInsertFact) r3;
assertEquals( "Person",
raif3.factType );