HHH-16261 - Check if address field has been generated in Author_ class

This commit is contained in:
Cedomir Igaly 2023-04-02 11:17:53 +02:00 committed by Christian Beikov
parent 52e84fb3e4
commit 643cd32504
1 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,8 @@ import org.hibernate.jpamodelgen.test.util.WithClasses;
import org.junit.Test;
import static org.hibernate.jpamodelgen.test.util.TestUtil.assertMetamodelClassGeneratedFor;
import static org.hibernate.jpamodelgen.test.util.TestUtil.getFieldFromMetamodelFor;
import static org.junit.Assert.assertNotNull;
public class Java14RecordsTest extends CompilationTest {
@ -15,5 +17,6 @@ public class Java14RecordsTest extends CompilationTest {
public void testEmbeddableRecordProperty() {
assertMetamodelClassGeneratedFor(Address.class);
assertMetamodelClassGeneratedFor(Author.class);
assertNotNull("Author must contain 'address' field", getFieldFromMetamodelFor(Author.class, "address"));
}
}