HHH-8127 Corrected failing test

This commit is contained in:
Brett Meyer 2013-04-03 10:29:12 -04:00
parent bae5a85c26
commit 47443bcf57
1 changed files with 32 additions and 39 deletions

View File

@ -56,13 +56,10 @@ public class EmbeddableIntegratorTest extends BaseUnitTestCase {
@Test(expected = GenericJDBCException.class) @Test(expected = GenericJDBCException.class)
public void testWithoutIntegrator() { public void testWithoutIntegrator() {
ServiceRegistry reg = new StandardServiceRegistryBuilder(new BootstrapServiceRegistryImpl()) ServiceRegistry reg = new StandardServiceRegistryBuilder( new BootstrapServiceRegistryImpl() ).build();
.build();
SessionFactory sf = new Configuration() SessionFactory sf = new Configuration().addAnnotatedClass( Investor.class )
.addAnnotatedClass( Investor.class ) .setProperty( "hibernate.hbm2ddl.auto", "create-drop" ).buildSessionFactory( reg );
.buildSessionFactory(reg);
Session sess = sf.openSession(); Session sess = sf.openSession();
Investor myInv = getInvestor(); Investor myInv = getInvestor();
@ -82,15 +79,11 @@ public class EmbeddableIntegratorTest extends BaseUnitTestCase {
@Test @Test
public void testWithIntegrator() { public void testWithIntegrator() {
StandardServiceRegistry reg = new StandardServiceRegistryBuilder( StandardServiceRegistry reg = new StandardServiceRegistryBuilder( new BootstrapServiceRegistryBuilder().with(
new BootstrapServiceRegistryBuilder().with( new InvestorIntegrator() ).build() new InvestorIntegrator() ).build() ).build();
).build();
SessionFactory sf = new Configuration() SessionFactory sf = new Configuration().addAnnotatedClass( Investor.class )
.addAnnotatedClass( Investor.class ) .setProperty( "hibernate.hbm2ddl.auto", "create-drop" ).buildSessionFactory( reg );
.setProperty("hibernate.hbm2ddl.auto", "create-drop")
.buildSessionFactory(reg);
Session sess = sf.openSession(); Session sess = sf.openSession();
Investor myInv = getInvestor(); Investor myInv = getInvestor();