本文整理汇总了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;未经允许,请勿转载。 |
请发表评论