org.junit.rules.TestRule
public class DbUnitRule extends Object implements org.junit.rules.TestRule
Constructor | Description |
---|---|
DbUnitRule(JdbcConfiguration configuration) |
Create rule using
JdbcConfiguration instance. |
DbUnitRule(JdbcConnectionFactory factory) |
Create rule using
JdbcConnectionFactory to create SQL Connection. |
Modifier and Type | Method | Description |
---|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement statement,
org.junit.runner.Description description) |
|
Connection |
getConnection() |
Get new SQL connection.
|
public DbUnitRule(JdbcConfiguration configuration)
JdbcConfiguration
instance.configuration
- JDBC Configuration.public DbUnitRule(JdbcConnectionFactory factory)
JdbcConnectionFactory
to create SQL Connection.factory
- JDBC Configuration.public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement statement, org.junit.runner.Description description)
apply
in interface org.junit.rules.TestRule
public Connection getConnection()
Copyright © 2017. All rights reserved.