int idx = 0;
IBasicEntity ent = null;
int adds = 100;
Class type = MINIMAL_ENTITY_CLASS;
EntityCachingService service = EntityCachingService.instance();
msg = "Adding " + adds + " entities to the cache.";
print(msg);
for(idx=0; idx<adds; idx++)
{ service.add(testEntities[idx]); }
msg = "Retrieving entities from the cache.";
print(msg);
for(idx=0; idx<adds; idx++)
{
ent = service.get(type, testEntityKeys[idx] );
assertEquals(msg, ent, testEntities[idx]);
}
msg = "Removing entities from the cache.";
print(msg);
for(idx=0; idx<numTestEntities; idx++)
{
service.remove( type, testEntityKeys[idx] );
ent = service.get( type, testEntityKeys[idx] );
assertNull(msg, ent);
}
print("***** LEAVING EntityCacheTester.testEntityCachingServiceAddsAndDeletes() *****");