TestConfig

来源:互联网 发布:图纸打印软件 编辑:程序博客网 时间:2024/06/05 23:54

package com.huawei.oss.test.framework;

import java.util.Properties;

import org.apache.log4j.Logger;
import org.dbunit.PropertiesBasedJdbcDatabaseTester;


public class TestConfig
{
    //private HashMap items = new HashMap();
    static Logger logger = Logger.getLogger(TestConfig.class);
   
    private static TestConfig self = null;
   
    public static TestConfig instance()
    {
        if (null == self)
        {
            self = new TestConfig();
        }
        return self;
    }
   
    private Properties configFile = null;
   
    private TestConfig()
    {
        loadPropFile();
        initDb();
    }
   
    public String getValue(String itemName)
    {
        return configFile.getProperty(itemName);
    }