mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-26 13:25:19 +00:00
HHH-17460 - Ongoing JPA 32 work
This commit is contained in:
parent
d62673c640
commit
42ab732328
hibernate-core/src/test/java/org/hibernate/orm/test/cfg/persister
20
hibernate-core/src/test/java/org/hibernate/orm/test/cfg/persister/PersisterClassProviderTest.java
20
hibernate-core/src/test/java/org/hibernate/orm/test/cfg/persister/PersisterClassProviderTest.java
@ -18,6 +18,7 @@
|
||||
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 void testPersisterClassProvider() {
|
||||
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 void testPersisterClassProvider() {
|
||||
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 void testPersisterClassProvider() {
|
||||
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 @@
|
||||
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…
x
Reference in New Issue
Block a user