// javadoc inherited protected void setUp() throws Exception { super.setUp(); // create the adapter process that will be added by the rule adapterProcess = new MockAdapterProcess(); // create the rule rule = new AddAdapterRule(); // get hold of the default pipeline factory XMLPipelineFactory factory = XMLPipelineFactory.getDefaultInstance(); // factory a pipeline configuration XMLPipelineConfiguration pipelineConfiguration = factory.createPipelineConfiguration(); // factor a DynamicProcessConfiguration DynamicProcessConfiguration dynamicConfig = factory.createDynamicProcessConfiguration(); // register the DynamicProcessConfiguration with the pipeline // configuration pipelineConfiguration.storeConfiguration(DynamicProcessConfiguration.class, dynamicConfig); // create a XMLPipelineContext EnvironmentInteraction interaction = null; XMLPipelineContext context = factory.createPipelineContext(pipelineConfiguration, interaction); // create a pipeline XMLPipeline pipeline = factory.createDynamicPipeline(context); // create a dynamic process dynamicProcess = factory.createDynamicProcess(new SimpleDynamicProcessConfiguration()); // finally, register the pipeline with the dynamic process dynamicProcess.setPipeline(pipeline); }
protected void tearDown() throws Exception { // Required to prevent each message being logged once for each test // that has run in the past - this generates a huge log output and // seems to crash JUnit reporting with an OutOfMemoryError. // Maybe we should put this in the servlet destroy() but the version of // Servlet Unit we are using has no way to shut down servlets - later // versions do appear to have this. Category.shutdown(); super.tearDown(); }
// javadoc inherited protected void setUp() throws Exception { super.setUp(); // Register the default application. ApplicationRegistry ar = ApplicationRegistry.getSingleton(); ApplicationRegistryContainer arc = new ApplicationRegistryContainer( new DefaultInternalApplicationContextFactory(), new DefaultServletApplicationContextFactory()); ar.registerApplication(ApplicationRegistry.DEFAULT_APPLICATION_NAME, arc); servletContext = new ServletContextStub(); volantis = new TestableVolantis() { // Javadoc inherited. public MarinerPageContext createMarinerPageContext() { return new TestMarinerPageContext(); } }; }
// JavaDoc inherited public void tearDown() throws Exception { super.tearDown(); }
// JavaDoc inherited public void setUp() throws Exception { super.setUp(); }
// javadoc inherited protected void tearDown() throws Exception { super.tearDown(); adapterProcess = null; rule = null; dynamicProcess = null; }