private DataSource dataSource;
private DatabaseUtils dbUtils;
private JpaBuilder jpaBuilder;
-
+
/**
* Constructs the tester.
*
public void start() throws Exception {
db = DatabaseBuilder.getDatabase();
dataSource = db.start();
-
- // NOTE: adding datasource to JNDI is no longer needed for
- // JPA testing, but is nice to have available for other uses.
+
+ // NOTE: adding datasource to JNDI is no longer needed for
+ // JPA testing, but is nice to have available for other uses.
StubInitialContextFactory.register();
try {
InitialContext ctx = new InitialContext();
dbUtils.start();
dbUtils.dropTables(JpaCustomizerBuilder.getCustomizer().getJpaTables());
- jpaBuilder = new JpaBuilder(db.getJdbcUrl(), db.getUsername(), db.getPassword(), persistenceUnit);
+ jpaBuilder = new JpaBuilder(db.getJdbcUrl(), db.getUsername(), db
+ .getPassword(), persistenceUnit);
jpaBuilder.start();
}
}
/**
- * Gets the database.
- * @return Database.
+ * Gets the database.
+ *
+ * @return Database.
*/
public Database getDb() {
return db;
}
/**
- * Gets the datasource.
- * @return Datasource.
+ * Gets the datasource.
+ *
+ * @return Datasource.
*/
public DataSource getDataSource() {
return dataSource;
}
/**
- * Gets the database utilities.
- * @return Database utilities.
+ * Gets the database utilities.
+ *
+ * @return Database utilities.
*/
public DatabaseUtils getDbUtils() {
return dbUtils;
}
/**
- * Gets the jpa builder.
- * @return JPA builder.
+ * Gets the jpa builder.
+ *
+ * @return JPA builder.
*/
public JpaBuilder getJpaBuilder() {
return jpaBuilder;
}
/**
- * Gets the persistence unit.
- * @return Persistence unit.
+ * Gets the persistence unit.
+ *
+ * @return Persistence unit.
*/
public PersistenceUnitDescription getPersistenceUnit() {
return persistenceUnit;