Search in sources :

Example 6 with MockConfiguration

use of com.opensymphony.xwork2.config.impl.MockConfiguration in project struts by apache.

the class ConfigurationTestBase method buildConfigurationProvider.

protected ConfigurationProvider buildConfigurationProvider(final String filename) {
    configuration = new MockConfiguration();
    ((MockConfiguration) configuration).selfRegister();
    container = configuration.getContainer();
    XmlConfigurationProvider prov = new StrutsXmlConfigurationProvider(filename);
    container.inject(prov);
    prov.init(configuration);
    prov.loadPackages();
    return prov;
}
Also used : StrutsXmlConfigurationProvider(org.apache.struts2.config.StrutsXmlConfigurationProvider) StrutsXmlConfigurationProvider(org.apache.struts2.config.StrutsXmlConfigurationProvider) MockConfiguration(com.opensymphony.xwork2.config.impl.MockConfiguration)

Aggregations

MockConfiguration (com.opensymphony.xwork2.config.impl.MockConfiguration)4 Mock (com.mockobjects.dynamic.Mock)2 ObjectFactory (com.opensymphony.xwork2.ObjectFactory)2 ConfigurationManager (com.opensymphony.xwork2.config.ConfigurationManager)2 PackageConfig (com.opensymphony.xwork2.config.entities.PackageConfig)2 StrutsXmlConfigurationProvider (org.apache.struts2.config.StrutsXmlConfigurationProvider)2 MockServletContext (org.springframework.mock.web.MockServletContext)2 FileManagerFactory (com.opensymphony.xwork2.FileManagerFactory)1 TestBean (com.opensymphony.xwork2.TestBean)1 Configuration (com.opensymphony.xwork2.config.Configuration)1 InterceptorMapping (com.opensymphony.xwork2.config.entities.InterceptorMapping)1 InterceptorStackConfig (com.opensymphony.xwork2.config.entities.InterceptorStackConfig)1 Container (com.opensymphony.xwork2.inject.Container)1 ContainerBuilder (com.opensymphony.xwork2.inject.ContainerBuilder)1 LocatableProperties (com.opensymphony.xwork2.util.location.LocatableProperties)1 URL (java.net.URL)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 BeanConfig (org.apache.struts2.config.entities.BeanConfig)1 BeanSelectionConfig (org.apache.struts2.config.entities.BeanSelectionConfig)1