diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Shop.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Shop.java index c37addbec0..5b917ec00e 100644 --- a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Shop.java +++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Shop.java @@ -31,4 +31,5 @@ public class Shop { String name; } + \ No newline at end of file diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/mappedsuperclass/mappedsuperclasswithoutid/Shop.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/mappedsuperclass/mappedsuperclasswithoutid/Shop.java index 2706461f39..7750a42cb8 100644 --- a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/mappedsuperclass/mappedsuperclasswithoutid/Shop.java +++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/mappedsuperclass/mappedsuperclasswithoutid/Shop.java @@ -29,4 +29,5 @@ public class Shop { String name; } + \ No newline at end of file diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/util/TestUtil.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/util/TestUtil.java index 7ba35e2144..2aafffb3b8 100644 --- a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/util/TestUtil.java +++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/util/TestUtil.java @@ -174,7 +174,7 @@ public class TestUtil { String metaModelClassName = entityClass.getName() + META_MODEL_CLASS_POSTFIX; try { URL outDirUrl = OUT_BASE_DIR.toURI().toURL(); - URL urls[] = new URL[1]; + URL[] urls = new URL[1]; urls[0] = outDirUrl; URLClassLoader classLoader = new URLClassLoader( urls, TestUtil.class.getClassLoader() ); return classLoader.loadClass( metaModelClassName ); diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/xmlmetacomplete/singlepu/XmlMetaDataCompleteSinglePersistenceUnitTest.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/xmlmetacomplete/singlepu/XmlMetaDataCompleteSinglePersistenceUnitTest.java index dea3eff885..63a85d507e 100644 --- a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/xmlmetacomplete/singlepu/XmlMetaDataCompleteSinglePersistenceUnitTest.java +++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/xmlmetacomplete/singlepu/XmlMetaDataCompleteSinglePersistenceUnitTest.java @@ -16,12 +16,10 @@ */ package org.hibernate.jpamodelgen.test.xmlmetacomplete.singlepu; -import java.util.HashMap; -import java.util.Map; - import org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor; import org.hibernate.jpamodelgen.test.util.CompilationTest; -import org.hibernate.jpamodelgen.test.util.TestUtil; +import org.hibernate.jpamodelgen.test.util.WithClasses; +import org.hibernate.jpamodelgen.test.util.WithProcessorOption; import org.junit.Test; import static org.hibernate.jpamodelgen.test.util.TestUtil.assertNoSourceFileGeneratedFor; @@ -31,19 +29,12 @@ import static org.hibernate.jpamodelgen.test.util.TestUtil.assertNoSourceFileGen */ public class XmlMetaDataCompleteSinglePersistenceUnitTest extends CompilationTest { @Test + @WithClasses(org.hibernate.jpamodelgen.test.xmlmetacomplete.multiplepus.Dummy.class) + @WithProcessorOption(key = JPAMetaModelEntityProcessor.PERSISTENCE_XML_OPTION, + value = "org/hibernate/jpamodelgen/test/xmlmetacomplete/singlepu/persistence.xml") public void testNoMetaModelGenerated() { // the xml mapping files used in the example say that the xml data is meta complete. For that // reason there should be no meta model source file for the annotated Dummy entity assertNoSourceFileGeneratedFor( Dummy.class ); } - -// @Override -// protected Map getProcessorOptions() { -// Map properties = new HashMap(); -// properties.put( -// JPAMetaModelEntityProcessor.PERSISTENCE_XML_OPTION, -// TestUtil.fcnToPath( XmlMetaDataCompleteSinglePersistenceUnitTest.class.getPackage().getName() ) + "/persistence.xml" -// ); -// return properties; -// } }