• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PropertiesBasedJdbcDatabaseTester类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.dbunit.PropertiesBasedJdbcDatabaseTester的典型用法代码示例。如果您正苦于以下问题:Java PropertiesBasedJdbcDatabaseTester类的具体用法?Java PropertiesBasedJdbcDatabaseTester怎么用?Java PropertiesBasedJdbcDatabaseTester使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PropertiesBasedJdbcDatabaseTester类属于org.dbunit包,在下文中一共展示了PropertiesBasedJdbcDatabaseTester类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: DbmsAwareTestCase

import org.dbunit.PropertiesBasedJdbcDatabaseTester; //导入依赖的package包/类
/**
* Constructor.
* 
* @param name test case name
*/
  public DbmsAwareTestCase(String name) {
      super(name);
      
      connectionArguments = new ArrayList<String>();
      
      connectionArguments.add(System.getProperty("DRIVER_CLASS"));
      connectionArguments.add(System.getProperty("DB_URL"));
      connectionArguments.add(System.getProperty("DB_USER"));
      connectionArguments.add(System.getProperty("DB_PASSWORD"));
      System.out.println(connectionArguments);

      System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_DRIVER_CLASS, System.getProperty("DRIVER_CLASS"));
      System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_CONNECTION_URL, System.getProperty("DB_URL"));
      System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_USERNAME, System.getProperty("DB_USER"));
      System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_PASSWORD, System.getProperty("DB_PASSWORD"));
  }
 
开发者ID:P15,项目名称:jailer,代码行数:22,代码来源:DbmsAwareTestCase.java


示例2: AbstractDaoTestCase

import org.dbunit.PropertiesBasedJdbcDatabaseTester; //导入依赖的package包/类
public AbstractDaoTestCase(String testName, String inputDataFileName) {
    super(testName);

    System.setProperty(
            PropertiesBasedJdbcDatabaseTester.DBUNIT_DRIVER_CLASS,
            JDBC_DRIVER);
    System.setProperty(
            PropertiesBasedJdbcDatabaseTester.DBUNIT_CONNECTION_URL,
            DATABASE);
    System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_USERNAME,
            USER);
    System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_PASSWORD,
            PASSWORD);
    ApplicationContext springApplicationContext =
            new FileSystemXmlApplicationContext(SPRING_FILE_PATH);
    springBeanFactory = springApplicationContext;
    this.inputDataFileName = inputDataFileName;
}
 
开发者ID:Tanaguru,项目名称:Web-snapshot,代码行数:19,代码来源:AbstractDaoTestCase.java


示例3: AbstractDaoTestCase

import org.dbunit.PropertiesBasedJdbcDatabaseTester; //导入依赖的package包/类
public AbstractDaoTestCase(String testName) {
    super(testName);
    ApplicationContext springApplicationContext =
            new FileSystemXmlApplicationContext(SPRING_FILE_PATH);
    springBeanFactory = springApplicationContext;
    DriverManagerDataSource dmds =
            (DriverManagerDataSource)springBeanFactory.getBean("dataSource");
    System.setProperty(
            PropertiesBasedJdbcDatabaseTester.DBUNIT_DRIVER_CLASS,
            JDBC_DRIVER);
    System.setProperty(
            PropertiesBasedJdbcDatabaseTester.DBUNIT_CONNECTION_URL,
            dmds.getUrl());
    System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_USERNAME,
            dmds.getUsername());
    System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_PASSWORD,
            dmds.getPassword());
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:19,代码来源:AbstractDaoTestCase.java


示例4: UMDatabaseTestCase

import org.dbunit.PropertiesBasedJdbcDatabaseTester; //导入依赖的package包/类
public UMDatabaseTestCase() {
	super();
	this.dataSetBuilder = new FlatXmlDataSetBuilder();

	System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_DRIVER_CLASS, "org.hsqldb.jdbcDriver");
	System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_CONNECTION_URL, "jdbc:hsqldb:mem:psdb");
	System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_USERNAME, "sa");
	System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_PASSWORD, "");
}
 
开发者ID:Jardo-51,项目名称:user_module,代码行数:10,代码来源:UMDatabaseTestCase.java


示例5: setUpDatabase

import org.dbunit.PropertiesBasedJdbcDatabaseTester; //导入依赖的package包/类
private void setUpDatabase() {
    System.setProperty(
            PropertiesBasedJdbcDatabaseTester.DBUNIT_DRIVER_CLASS,
            JDBC_DRIVER);
    System.setProperty(
            PropertiesBasedJdbcDatabaseTester.DBUNIT_CONNECTION_URL,
            DATABASE);
    System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_USERNAME,
            USER);
    System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_PASSWORD,
            PASSWORD);
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:13,代码来源:AbstractRuleImplementationTestCase.java


示例6: AbstractDbUnitTest

import org.dbunit.PropertiesBasedJdbcDatabaseTester; //导入依赖的package包/类
/**
 * Constructeur 
 * @param testName Le nom du test
 */
public AbstractDbUnitTest(String testName) {
    super(testName);
    ApplicationContext springApplicationContext = new FileSystemXmlApplicationContext(SPRING_FILE_PATH);
    springBeanFactory = springApplicationContext;
    DriverManagerDataSource dmds =(DriverManagerDataSource)springBeanFactory.getBean("dataSource");
    System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_DRIVER_CLASS,JDBC_DRIVER);
    System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_CONNECTION_URL,dmds.getUrl());
    System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_USERNAME,dmds.getUsername());
    System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_PASSWORD,dmds.getPassword());
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:15,代码来源:AbstractDbUnitTest.java


示例7: DominionTestBase

import org.dbunit.PropertiesBasedJdbcDatabaseTester; //导入依赖的package包/类
public DominionTestBase(String dataSet,
						String driver,
						String connectionUrl,
						String dbUsername,
						String dbPassword) throws DataSetException, FileNotFoundException, IOException {
	super("Test");
	this.dataSet = new FlatXmlDataSet(new FileInputStream(getClass().getResource(dataSet).getFile()));
	System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_DRIVER_CLASS, driver);
       System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_CONNECTION_URL, connectionUrl );
       System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_USERNAME, dbUsername );
       System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_PASSWORD, dbPassword);
}
 
开发者ID:willisjtc,项目名称:Dominator,代码行数:13,代码来源:DominionTestBase.java


示例8: SingleDBBaseTestCase

import org.dbunit.PropertiesBasedJdbcDatabaseTester; //导入依赖的package包/类
public SingleDBBaseTestCase() {
	System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_DRIVER_CLASS, getDriverName());
	System.setProperty(PropertiesBasedJdbcDatabaseTester.DBUNIT_CONNECTION_URL, getDBUrl());
}
 
开发者ID:dianping,项目名称:zebra,代码行数:5,代码来源:SingleDBBaseTestCase.java



注:本文中的org.dbunit.PropertiesBasedJdbcDatabaseTester类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java XmlAttribute类代码示例发布时间:2022-05-23
下一篇:
Java Box类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap