use of org.xwiki.velocity.VelocityContextFactory in project xwiki-platform by xwiki.
the class VelocityContextInitializerTest method testVelocityBridges.
/**
* Test the presence of velocity bridges.
*
* @throws Exception
*/
@Test
public void testVelocityBridges() throws Exception {
// Make sure the execution context is not null when velocity bridges are initialized.
getComponentManager().<Execution>getInstance(Execution.class).setContext(new ExecutionContext());
VelocityContextFactory factory = getComponentManager().getInstance(VelocityContextFactory.class);
VelocityContext context = factory.createContext();
Assert.assertNotNull(context.get("officeimporter"));
Assert.assertNotNull(context.get("ooconfig"));
Assert.assertNotNull(context.get("oomanager"));
}
Aggregations