doInContextTest(pipelineContext,
"CompilableNestedTransformationsTestCase.input.xml",
"NestedTransformationsTestCase.expected.xml");
DefaultTransformConfiguration config = (DefaultTransformConfiguration)
pipeline.getPipelineContext().getPipelineConfiguration().
retrieveConfiguration(TransformConfiguration.class);
// Test the defaults
assertFalse("No cache specified as default",
config.isTemplateCacheRequired());
assertNull("Should be no cache available", config.getTemplateCache());
// Enabling caching
config.setTemplateCacheRequired(true);
assertNotNull("Cache should be created", config.getTemplateCache());
// Re-run through the pipeline
doInContextTest(pipelineContext,
"CompilableNestedTransformationsTestCase.input.xml",
"NestedTransformationsTestCase.expected.xml");
// Check for something in the cache
GenericCache cache = (GenericCache) config.getTemplateCache();
assertFalse("Should be something in the cache", cache.isEmpty());
}