previousDeclarations,
localDeclarations,
returnValue,
returnValueDescr );
ContextEntry retValContext = returnValue.createContextEntry();
final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
final InternalWorkingMemory wm = (InternalWorkingMemory) ruleBase.newStatefulSession();
final Cheese stilton = new Cheese( "stilton",
10 );
final Cheese cheddar = new Cheese( "cheddar",
10 );
final InternalFactHandle f0 = (InternalFactHandle) wm.insert( cheddar );
ReteTuple tuple = new ReteTuple( f0 );
final InternalFactHandle f1 = (InternalFactHandle) wm.insert( stilton );
tuple = new ReteTuple( tuple,
f1 );
final Cheese brie = new Cheese( "brie",
20 );
ContextEntry ctx = returnValue.createContextEntry();
assertTrue( returnValue.isAllowed( extractor,
brie,
tuple,
wm,