Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import org.hibernate.tools.test.util.HibernateUtil;
import org.hibernate.tools.test.util.JUnitUtil;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import org.w3c.dom.Document;
Expand Down Expand Up @@ -82,8 +81,6 @@ public void setUp() throws Exception {
hbmexporter.start();
}

// TODO HBX-2062: Investigate and reenable
@Disabled
@Test
public void testAllFilesExistence() {
JUnitUtil.assertIsNonEmptyFile(
Expand All @@ -92,8 +89,6 @@ public void testAllFilesExistence() {
"org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/Order.hbm.xml"));
}

// TODO HBX-2062: Investigate and reenable
@Disabled
@Test
public void testReadable() {
File orderHbmXml =
Expand All @@ -102,14 +97,13 @@ public void testReadable() {
"org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/Order.hbm.xml");
Properties properties = new Properties();
properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName());
properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName());
File[] files = new File[] { orderHbmXml };
MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory
.createNativeDescriptor(null, files, properties);
assertNotNull(metadataDescriptor.createMetadata());
}

// TODO HBX-2062: Investigate and reenable
@Disabled
@Test
public void testTypeParamsElements() throws Exception {
File outputXml = new File(
Expand Down Expand Up @@ -163,10 +157,14 @@ public void testTypeParamsElements() throws Exception {
set.contains("enumClass"),
"Can't find 'enumClass' param");
assertEquals(
"org.hibernate.tool.hbm2x.hbm2hbmxml.Order$Status",
Status.class.getName(),
params.get("enumClass"));
assertTrue(nameElement.getElementsByTagName("type").getLength() == 0, "property name should not have any type element");
assertEquals(nameElement.getAttribute("type"), "string");
}

enum Status {
ON, OFF
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<param name="column">STATUS</param>
<param name="table">ORDERS</param>
<param name="schema"/>
<param name="enumClass">org.hibernate.tool.hbm2x.hbm2hbmxml.Order$Status</param>
<param name="enumClass">org.hibernate.tool.hbm2x.hbm2hbmxml.TypeParamsTest.TestCase$Status</param>
</type>
</property>
<property name="name" type="string"/>
Expand Down