/**
* Test the creation of a Struts 1.x ModuleConfig wrapper around an XWork PackageConfig.
* The PackageConfig is loaded from test-struts-factory.xml.
*/
public void testCreateModuleConfig() {
ModuleConfig moduleConfig = factory.createModuleConfig(PACKAGE_NAME);
assertNotNull(moduleConfig);
assertEquals("/"+PACKAGE_NAME, moduleConfig.getPrefix());
ActionConfig actionConfig = moduleConfig.findActionConfig("/action1");
assertNotNull(actionConfig);
assertEquals("/action1", actionConfig.getPath());
ActionConfig[] actionConfigs = moduleConfig.findActionConfigs();
assertNotNull(actionConfigs);
assertEquals(2, actionConfigs.length);
ExceptionConfig exceptionConfig = moduleConfig.findExceptionConfig(Exception.class.getName());
assertNotNull(exceptionConfig);
assertEquals(Exception.class.getName(), exceptionConfig.getType());
ExceptionConfig[] exceptionConfigs = moduleConfig.findExceptionConfigs();
assertNotNull(exceptionConfigs);
assertEquals(1, exceptionConfigs.length);
ForwardConfig fwdConfig = moduleConfig.findForwardConfig("globalResult");
assertNotNull(fwdConfig);
assertEquals("globalResult", fwdConfig.getName());
// These methods are currently not implemented -- replace as functionality is added.
assertNYI(moduleConfig, "getControllerConfig", null);