From 643cd325047205cbb5846c4a8528911edfbc40bd Mon Sep 17 00:00:00 2001 From: Cedomir Igaly Date: Sun, 2 Apr 2023 11:17:53 +0200 Subject: [PATCH] HHH-16261 - Check if address field has been generated in Author_ class --- .../hibernate/jpamodelgen/test/records/Java14RecordsTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/records/Java14RecordsTest.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/records/Java14RecordsTest.java index c978f82763..e965b3b57f 100644 --- a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/records/Java14RecordsTest.java +++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/records/Java14RecordsTest.java @@ -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")); } }