Created
September 24, 2013 13:55
-
-
Save thody/6685122 to your computer and use it in GitHub Desktop.
Snippet depicting usage of `DBIRule` with `DataSourceFactory` passed in via constructor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static DataSourceFactory dataSourceFactory; | |
@BeforeClass | |
public static void setUpClass() { | |
dataSourceFactory = new DataSourceFactory(); | |
dataSourceFactory.setUrl("jdbc:h2:mem:DbTest-" + System.currentTimeMillis()); | |
dataSourceFactory.setUser("sa"); | |
dataSourceFactory.setPassword(""); | |
dataSourceFactory.setDriverClass("org.h2.Driver"); | |
} | |
@Rule | |
public DBIRule dbiRule = new DBIRule(dataSourceFactory); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment