includepropertiestest.java

来自「jConfig,JAVA读取XML的开源项目」· Java 代码 · 共 46 行

JAVA
46
字号
/*
 * ConfigurationTest.java
 *
 * Created on 19. November 2002, 22:37
 */
package org.jconfig;

import junit.framework.TestCase;

import org.jconfig.parser.DefaultConfigParser;
/**
 * test cases for the for the configuration
 *
 * @author Andreas Mecky <andreas.mecky@xcom.de>
 * @author Terry Dye <terry.dye@xcom.de>
 */
public class IncludePropertiesTest extends TestCase {
    
    public IncludePropertiesTest(String name) {
        super(name);
    }
    /**
     *  The main program for the ConfigurationTest class
     *
     *@param  args  The command line arguments
     */
    public static void main(String[] args) {
        junit.textui.TestRunner.run(IncludePropertiesTest.class);
    }
    
    protected void setUp() {
        ConfigurationManager.getInstance().removeConfiguration("default");
        System.setProperty("jconfig.parser", DefaultConfigParser.class.getName());        
    }
    
    protected void tearDown() {
    }
    
    public void testGetInclude() {
        Configuration config = ConfigurationManager.getConfiguration();
        String val = config.getProperty("varprop1",null,"includeTest");
        assertNotNull(val);
        assertEquals("value1",val);
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?