4545import org .hibernate .tools .test .util .HibernateUtil ;
4646import org .hibernate .tools .test .util .JUnitUtil ;
4747import org .junit .jupiter .api .BeforeEach ;
48- import org .junit .jupiter .api .Disabled ;
4948import org .junit .jupiter .api .Test ;
5049import org .junit .jupiter .api .io .TempDir ;
5150import org .w3c .dom .Document ;
@@ -82,8 +81,6 @@ public void setUp() throws Exception {
8281 hbmexporter .start ();
8382 }
8483
85- // TODO HBX-2062: Investigate and reenable
86- @ Disabled
8784 @ Test
8885 public void testAllFilesExistence () {
8986 JUnitUtil .assertIsNonEmptyFile (
@@ -92,8 +89,6 @@ public void testAllFilesExistence() {
9289 "org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/Order.hbm.xml" ));
9390 }
9491
95- // TODO HBX-2062: Investigate and reenable
96- @ Disabled
9792 @ Test
9893 public void testReadable () {
9994 File orderHbmXml =
@@ -102,14 +97,13 @@ public void testReadable() {
10297 "org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/Order.hbm.xml" );
10398 Properties properties = new Properties ();
10499 properties .setProperty (AvailableSettings .DIALECT , HibernateUtil .Dialect .class .getName ());
100+ properties .setProperty (AvailableSettings .CONNECTION_PROVIDER , HibernateUtil .ConnectionProvider .class .getName ());
105101 File [] files = new File [] { orderHbmXml };
106102 MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory
107103 .createNativeDescriptor (null , files , properties );
108104 assertNotNull (metadataDescriptor .createMetadata ());
109105 }
110106
111- // TODO HBX-2062: Investigate and reenable
112- @ Disabled
113107 @ Test
114108 public void testTypeParamsElements () throws Exception {
115109 File outputXml = new File (
@@ -163,10 +157,14 @@ public void testTypeParamsElements() throws Exception {
163157 set .contains ("enumClass" ),
164158 "Can't find 'enumClass' param" );
165159 assertEquals (
166- "org.hibernate.tool.hbm2x.hbm2hbmxml.Order$Status" ,
160+ Status . class . getName () ,
167161 params .get ("enumClass" ));
168162 assertTrue (nameElement .getElementsByTagName ("type" ).getLength () == 0 , "property name should not have any type element" );
169163 assertEquals (nameElement .getAttribute ("type" ), "string" );
170164 }
165+
166+ enum Status {
167+ ON , OFF
168+ }
171169
172170}
0 commit comments