protected void loadButAdd(final Class<?> type, final Object impl) { loadButAdd(type, Container.DEFAULT_NAME, impl); }
protected void loadButAdd(final Class<?> type, final String name, final Object impl) { loadConfigurationProviders(new StubConfigurationProvider() { @Override public void register(ContainerBuilder builder, LocatableProperties props) throws ConfigurationException { builder.factory(type, name, new Factory() { public Object create(Context context) throws Exception { return impl; } }, Scope.SINGLETON); } }); }
protected void tearDown() throws Exception { super.tearDown(); // maybe someone else already destroyed Dispatcher if (dispatcher != null && dispatcher.getConfigurationManager() != null) { dispatcher.cleanup(); dispatcher = null; } StrutsTestCaseHelper.tearDown(); }
/** * Sets up the configuration settings, XWork configuration, and * message resources */ protected void setUp() throws Exception { super.setUp(); initServletMockObjects(); setupBeforeInitDispatcher(); dispatcher = initDispatcher(dispatcherInitParams); setupAfterInitDispatcher(dispatcher); }