DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Haikal has posted 8 posts at DZone. View Full User Profile

Set Connection Properties When Using IDatabaseTester

01.12.2009
| 2760 views |
  • submit to reddit
        Configure dbunit when using IDatabaseTester & Friends.

databaseTester = new DataSourceDatabaseTester(dataSource) {
			public IDatabaseConnection getConnection() throws Exception {
				IDatabaseConnection connection = super.getConnection();
				connection.getConfig().setFeature(DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES, true);
				return connection;
			}
		};