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 @@ -56,6 +56,8 @@
* @author Dmitry Geraskov
* @author koen
*/
//TODO Reenable this test and make it pass (See HBX-2884)
@Disabled
public class TestCase {

private static final String[] HBM_XML_FILES = new String[] {
Expand All @@ -82,8 +84,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 +92,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 +100,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 +160,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