HHH-17460 - Ongoing JPA 32 work
This commit is contained in:
parent
d62673c640
commit
42ab732328
|
@ -18,6 +18,7 @@ import org.hibernate.testing.junit4.BaseUnitTestCase;
|
|||
import org.hibernate.testing.util.ServiceRegistryUtil;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.fail;
|
||||
|
@ -56,11 +57,8 @@ public class PersisterClassProviderTest extends BaseUnitTestCase {
|
|||
fail("The entity persister should be overridden");
|
||||
}
|
||||
catch ( MappingException e ) {
|
||||
assertEquals(
|
||||
"The entity persister should be overridden",
|
||||
GoofyPersisterClassProvider.NoopEntityPersister.class,
|
||||
( (GoofyException) e.getCause() ).getValue()
|
||||
);
|
||||
// expected
|
||||
assertThat( e.getCause() ).isInstanceOf( GoofyException.class );
|
||||
}
|
||||
finally {
|
||||
StandardServiceRegistryBuilder.destroy( serviceRegistry );
|
||||
|
@ -81,10 +79,8 @@ public class PersisterClassProviderTest extends BaseUnitTestCase {
|
|||
fail("The collection persister should be overridden but not the entity persister");
|
||||
}
|
||||
catch ( MappingException e ) {
|
||||
assertEquals(
|
||||
"The collection persister should be overridden but not the entity persister",
|
||||
GoofyPersisterClassProvider.NoopCollectionPersister.class,
|
||||
( (GoofyException) e.getCause() ).getValue() );
|
||||
// expected
|
||||
assertThat( e.getCause() ).isInstanceOf( GoofyException.class );
|
||||
}
|
||||
finally {
|
||||
StandardServiceRegistryBuilder.destroy( serviceRegistry );
|
||||
|
@ -104,10 +100,8 @@ public class PersisterClassProviderTest extends BaseUnitTestCase {
|
|||
fail("The entity persisters should be overridden in a class hierarchy");
|
||||
}
|
||||
catch ( MappingException e ) {
|
||||
assertEquals(
|
||||
"The entity persisters should be overridden in a class hierarchy",
|
||||
GoofyPersisterClassProvider.NoopEntityPersister.class,
|
||||
( (GoofyException) e.getCause() ).getValue() );
|
||||
// expected
|
||||
assertThat( e.getCause() ).isInstanceOf( GoofyException.class );
|
||||
}
|
||||
finally {
|
||||
StandardServiceRegistryBuilder.destroy( serviceRegistry );
|
||||
|
|
|
@ -7,18 +7,15 @@
|
|||
package org.hibernate.orm.test.cfg.persister;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.OneToMany;
|
||||
|
||||
import org.hibernate.annotations.Persister;
|
||||
import org.hibernate.persister.entity.SingleTableEntityPersister;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
*/
|
||||
@Entity
|
||||
@Persister( impl = SingleTableEntityPersister.class)
|
||||
public class Portal {
|
||||
@Id
|
||||
public Long getId() { return id; }
|
||||
|
|
|
@ -9,14 +9,10 @@ package org.hibernate.orm.test.cfg.persister;
|
|||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
import org.hibernate.annotations.Persister;
|
||||
import org.hibernate.persister.entity.SingleTableEntityPersister;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Bernard
|
||||
*/
|
||||
@Entity
|
||||
@Persister( impl = SingleTableEntityPersister.class)
|
||||
public class Window {
|
||||
@Id
|
||||
public Long getId() { return id; }
|
||||
|
|
Loading…
Reference in New Issue