X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=test%2Fenterprise%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsupport%2Fpersistence%2FJpaTester.java;h=26bf6bbc1d75f8c9edb43fafcb5013529c8553ef;hb=dec278a67997ea8e85d10662e31548afd8890ed3;hp=19f7f187d5838f5ef1272db9d67d8934d3a1bb48;hpb=685578ba5b0c34b26b127405cad1202623280e50;p=utils diff --git a/test/enterprise/src/main/java/org/wamblee/support/persistence/JpaTester.java b/test/enterprise/src/main/java/org/wamblee/support/persistence/JpaTester.java index 19f7f187..26bf6bbc 100644 --- a/test/enterprise/src/main/java/org/wamblee/support/persistence/JpaTester.java +++ b/test/enterprise/src/main/java/org/wamblee/support/persistence/JpaTester.java @@ -94,18 +94,12 @@ public class JpaTester { throw new RuntimeException("JNDI problem", e); } - dbUtils = new DatabaseUtils(dataSource, persistenceUnit.getTables()); + dbUtils = new DatabaseUtils(dataSource); dbUtils.start(); - dbUtils.dropTables(); dbUtils.dropTables(JpaCustomizerBuilder.getCustomizer().getJpaTables()); jpaBuilder = new JpaBuilder(db.getJdbcUrl(), db.getUsername(), db.getPassword(), persistenceUnit); jpaBuilder.start(); - - // db tester should be created after Jpa builder because jpa builder - // creates the - // tables that the tester looks at when it is initialized. - dbTester = dbUtils.createDbTester(); } /** @@ -123,26 +117,42 @@ public class JpaTester { } } + /** + * Gets the database. + * @return Database. + */ public Database getDb() { return db; } + /** + * Gets the datasource. + * @return Datasource. + */ public DataSource getDataSource() { return dataSource; } - public IDatabaseTester getDbTester() { - return dbTester; - } - + /** + * Gets the database utilities. + * @return Database utilities. + */ public DatabaseUtils getDbUtils() { return dbUtils; } + /** + * Gets the jpa builder. + * @return JPA builder. + */ public JpaBuilder getJpaBuilder() { return jpaBuilder; } + /** + * Gets the persistence unit. + * @return Persistence unit. + */ public PersistenceUnitDescription getPersistenceUnit() { return persistenceUnit; }