// Path: src/main/java/org/seasar/struts/config/S2ModuleConfig.java
// public class S2ModuleConfig extends ModuleConfigImpl implements Disposable {
// 
//     private static final long serialVersionUID = 1L;
// 
//     /**
//      * 初期化されたかどうかです。
//      */
//     protected volatile boolean initialized;
// 
//     /**
//      * インスタンスを構築します。
//      * 
//      * @param prefix
//      *            プレフィックス
//      */
//     public S2ModuleConfig(String prefix) {
//         super(prefix);
//         initialize();
//     }
// 
//     /**
//      * 初期化を行ないます。
//      */
//     public void initialize() {
//         DisposableUtil.add(this);
//         initialized = true;
//     }
// 
//     public void dispose() {
//         actionConfigs.clear();
//         actionConfigList.clear();
//         formBeans.clear();
//         BeanUtilsBean.setInstance(new BeanUtilsBean());
//         initialized = false;
//     }
// 
//     @Override
//     public ActionConfig findActionConfig(String path) {
//         if (!initialized) {
//             initialize();
//         }
//         ActionConfig ac = (ActionConfig) actionConfigs.get(path);
//         if (ac == null && HotdeployUtil.isHotdeploy()) {
//             SingletonS2ContainerFactory.getContainer().getComponent(
//                     ActionUtil.fromPathToActionName(path));
//         }
//         return (ActionConfig) actionConfigs.get(path);
//     }
// 
//     @Override
//     public void freeze() {
//     }
// }


import org.apache.struts.Globals;
import org.seasar.extension.unit.S2TestCase;
import org.seasar.struts.config.S2ModuleConfig;

/*
 * Copyright 2004-2009 the Seasar Foundation and the Others.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package org.seasar.struts.util;


/**
 * @author higa
 * 
 */
public class S2ModuleConfigUtilTest extends S2TestCase {

    /**
     * @throws Exception
     */
    public void testGetModuleConfig() throws Exception {
        getServletContext().setAttribute(Globals.MODULE_KEY,

// Path: src/main/java/org/seasar/struts/config/S2ModuleConfig.java
// public class S2ModuleConfig extends ModuleConfigImpl implements Disposable {
// 
//     private static final long serialVersionUID = 1L;
// 
//     /**
//      * 初期化されたかどうかです。
//      */
//     protected volatile boolean initialized;
// 
//     /**
//      * インスタンスを構築します。
//      * 
//      * @param prefix
//      *            プレフィックス
//      */
//     public S2ModuleConfig(String prefix) {
//         super(prefix);
//         initialize();
//     }
// 
//     /**
//      * 初期化を行ないます。
//      */
//     public void initialize() {
//         DisposableUtil.add(this);
//         initialized = true;
//     }
// 
//     public void dispose() {
//         actionConfigs.clear();
//         actionConfigList.clear();
//         formBeans.clear();
//         BeanUtilsBean.setInstance(new BeanUtilsBean());
//         initialized = false;
//     }
// 
//     @Override
//     public ActionConfig findActionConfig(String path) {
//         if (!initialized) {
//             initialize();
//         }
//         ActionConfig ac = (ActionConfig) actionConfigs.get(path);
//         if (ac == null && HotdeployUtil.isHotdeploy()) {
//             SingletonS2ContainerFactory.getContainer().getComponent(
//                     ActionUtil.fromPathToActionName(path));
//         }
//         return (ActionConfig) actionConfigs.get(path);
//     }
// 
//     @Override
//     public void freeze() {
//     }
// }


// Path: src/test/java/org/seasar/struts/util/S2ModuleConfigUtilTest.java
import org.apache.struts.Globals;
import org.seasar.extension.unit.S2TestCase;
import org.seasar.struts.config.S2ModuleConfig;

/*
 * Copyright 2004-2009 the Seasar Foundation and the Others.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package org.seasar.struts.util;


/**
 * @author higa
 * 
 */
public class S2ModuleConfigUtilTest extends S2TestCase {

    /**
     * @throws Exception
     */
    public void testGetModuleConfig() throws Exception {
        getServletContext().setAttribute(Globals.MODULE_KEY,

                new S2ModuleConfig(""));
