45
45
import org .hibernate .tools .test .util .HibernateUtil ;
46
46
import org .hibernate .tools .test .util .JUnitUtil ;
47
47
import org .junit .jupiter .api .BeforeEach ;
48
- import org .junit .jupiter .api .Disabled ;
49
48
import org .junit .jupiter .api .Test ;
50
49
import org .junit .jupiter .api .io .TempDir ;
51
50
import org .w3c .dom .Document ;
@@ -82,8 +81,6 @@ public void setUp() throws Exception {
82
81
hbmexporter .start ();
83
82
}
84
83
85
- // TODO HBX-2062: Investigate and reenable
86
- @ Disabled
87
84
@ Test
88
85
public void testAllFilesExistence () {
89
86
JUnitUtil .assertIsNonEmptyFile (
@@ -92,8 +89,6 @@ public void testAllFilesExistence() {
92
89
"org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/Order.hbm.xml" ));
93
90
}
94
91
95
- // TODO HBX-2062: Investigate and reenable
96
- @ Disabled
97
92
@ Test
98
93
public void testReadable () {
99
94
File orderHbmXml =
@@ -102,14 +97,13 @@ public void testReadable() {
102
97
"org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/Order.hbm.xml" );
103
98
Properties properties = new Properties ();
104
99
properties .setProperty (AvailableSettings .DIALECT , HibernateUtil .Dialect .class .getName ());
100
+ properties .setProperty (AvailableSettings .CONNECTION_PROVIDER , HibernateUtil .ConnectionProvider .class .getName ());
105
101
File [] files = new File [] { orderHbmXml };
106
102
MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory
107
103
.createNativeDescriptor (null , files , properties );
108
104
assertNotNull (metadataDescriptor .createMetadata ());
109
105
}
110
106
111
- // TODO HBX-2062: Investigate and reenable
112
- @ Disabled
113
107
@ Test
114
108
public void testTypeParamsElements () throws Exception {
115
109
File outputXml = new File (
@@ -163,10 +157,14 @@ public void testTypeParamsElements() throws Exception {
163
157
set .contains ("enumClass" ),
164
158
"Can't find 'enumClass' param" );
165
159
assertEquals (
166
- "org.hibernate.tool.hbm2x.hbm2hbmxml.Order$Status" ,
160
+ Status . class . getName () ,
167
161
params .get ("enumClass" ));
168
162
assertTrue (nameElement .getElementsByTagName ("type" ).getLength () == 0 , "property name should not have any type element" );
169
163
assertEquals (nameElement .getAttribute ("type" ), "string" );
170
164
}
165
+
166
+ enum Status {
167
+ ON , OFF
168
+ }
171
169
172
170
}
0 commit comments