Search in sources :

Example 1 with EnhancerTestContext

use of org.hibernate.testing.bytecode.enhancement.EnhancerTestContext in project hibernate-orm by hibernate.

the class EnhancerTest method testMappedSuperclass.

@Test
@TestForIssue(jiraKey = "HHH-10646")
public void testMappedSuperclass() {
    EnhancerTestUtils.runEnhancerTestTask(MappedSuperclassTestTask.class);
    EnhancerTestUtils.runEnhancerTestTask(MappedSuperclassTestTask.class, new EnhancerTestContext() {

        @Override
        public boolean hasLazyLoadableAttributes(UnloadedClass classDescriptor) {
            // HHH-10981 - Without lazy loading, the generation of getters and setters has a different code path
            return false;
        }
    });
}
Also used : UnloadedClass(org.hibernate.bytecode.enhance.spi.UnloadedClass) EnhancerTestContext(org.hibernate.testing.bytecode.enhancement.EnhancerTestContext) Test(org.junit.Test) TestForIssue(org.hibernate.testing.TestForIssue)

Example 2 with EnhancerTestContext

use of org.hibernate.testing.bytecode.enhancement.EnhancerTestContext in project hibernate-orm by hibernate.

the class EnhancerTest method testInherited.

@Test
@TestForIssue(jiraKey = "HHH-11284")
public void testInherited() {
    EnhancerTestUtils.runEnhancerTestTask(InheritedTestTask.class);
    EnhancerTestUtils.runEnhancerTestTask(InheritedTestTask.class, new EnhancerTestContext() {

        @Override
        public boolean hasLazyLoadableAttributes(UnloadedClass classDescriptor) {
            // HHH-10981 - Without lazy loading, the generation of getters and setters has a different code path
            return false;
        }
    });
}
Also used : UnloadedClass(org.hibernate.bytecode.enhance.spi.UnloadedClass) EnhancerTestContext(org.hibernate.testing.bytecode.enhancement.EnhancerTestContext) Test(org.junit.Test) TestForIssue(org.hibernate.testing.TestForIssue)

Aggregations

UnloadedClass (org.hibernate.bytecode.enhance.spi.UnloadedClass)2 TestForIssue (org.hibernate.testing.TestForIssue)2 EnhancerTestContext (org.hibernate.testing.bytecode.enhancement.EnhancerTestContext)2 Test (org.junit.Test)2