node.assertTuple( tuple1,
this.context,
this.workingMemory );
// Check memory was populated
final TupleHashTable memory = (TupleHashTable) this.workingMemory.getNodeMemory( node );
assertEquals( 2,
memory.size() );
assertTrue( memory.contains( tuple0 ) );
assertTrue( memory.contains( tuple1 ) );
// make sure assertions were propagated
assertEquals( 2,
sink.getAsserted().size() );
// Now test that the fact is retracted correctly
node.retractTuple( tuple0,
this.context,
this.workingMemory );
// Now test that the fact is retracted correctly
assertEquals( 1,
memory.size() );
assertTrue( memory.contains( tuple1 ) );
// make sure retractions were propagated
assertEquals( 1,
sink.getRetracted().size() );
// Now test that the fact is retracted correctly
node.retractTuple( tuple1,
this.context,
this.workingMemory );
// Now test that the fact is retracted correctly
assertEquals( 0,
memory.size() );
// make sure retractions were propagated
assertEquals( 2,
sink.getRetracted().size() );
}