Added regression test for HHH-8769

This commit is contained in:
Felix Feisst 2014-02-07 22:27:09 +01:00 committed by Brett Meyer
parent 715544febe
commit a05460a23f
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,33 @@
package org.hibernate.envers.test.integration.dynamicmodel;
import static org.junit.Assert.assertNotNull;
import javax.persistence.EntityManager;
import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
import org.hibernate.testing.FailureExpected;
import org.hibernate.testing.TestForIssue;
import org.junit.Test;
/**
* @author Felix Feisst (feisst dot felix at gmail dot com)
*/
@TestForIssue(jiraKey = "HHH-8769")
public class DynamicModelTest extends BaseEnversJPAFunctionalTestCase {
@Override
protected String[] getMappings() {
return new String[] { "mappings/dynamicmodel/dynamicModel.hbm.xml" };
}
/**
* Tests that an EntityManager can be created when using a dynamic model mapping.
*/
@Test
@FailureExpected(jiraKey = "HHH-8769")
public void testDynamicModelMapping() {
EntityManager entityManager = getOrCreateEntityManager();
assertNotNull( "Expected an entity manager to be returned", entityManager );
}
}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="WINDOWS-1251"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<!-- no name attribute is specified for dynamic models -->
<class
entity-name="DynamicModelEntity" table="dynamic_model_entity"
abstract="true" >
<id name="id" column="ID" type="long">
<generator class="increment" />
</id>
</class>
</hibernate-mapping>