HHH-3563: changing tests to use the same convention
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@15803 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
bf8e6fed6f
commit
45e93dc562
|
@ -42,7 +42,7 @@ public class MixedAccessType extends AbstractEntityTest {
|
|||
cfg.addAnnotatedClass(MixedAccessTypeEntity.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
@BeforeClass(dependsOnMethods = "init")
|
||||
public void initData() {
|
||||
EntityManager em = getEntityManager();
|
||||
em.getTransaction().begin();
|
||||
|
@ -57,12 +57,12 @@ public class MixedAccessType extends AbstractEntityTest {
|
|||
em.getTransaction().commit();
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = "initData")
|
||||
@Test
|
||||
public void testRevisionsCounts() {
|
||||
assert Arrays.asList(1, 2).equals(getAuditReader().getRevisions(MixedAccessTypeEntity.class, id1));
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = "initData")
|
||||
@Test
|
||||
public void testHistoryOfId1() {
|
||||
MixedAccessTypeEntity ver1 = new MixedAccessTypeEntity(id1, "data");
|
||||
MixedAccessTypeEntity ver2 = new MixedAccessTypeEntity(id1, "data2");
|
||||
|
|
|
@ -48,7 +48,7 @@ public class ManyToOneInComponent extends AbstractEntityTest {
|
|||
cfg.addAnnotatedClass(StrTestEntity.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
@BeforeClass(dependsOnMethods = "init")
|
||||
public void initData() {
|
||||
// Revision 1
|
||||
EntityManager em = getEntityManager();
|
||||
|
@ -89,12 +89,12 @@ public class ManyToOneInComponent extends AbstractEntityTest {
|
|||
ste_id2 = ste2.getId();
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = "initData")
|
||||
@Test
|
||||
public void testRevisionsCounts() {
|
||||
assert Arrays.asList(2, 3).equals(getAuditReader().getRevisions(ManyToOneComponentTestEntity.class, mtocte_id1));
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = "initData")
|
||||
@Test
|
||||
public void testHistoryOfId1() {
|
||||
StrTestEntity ste1 = getEntityManager().find(StrTestEntity.class, ste_id1);
|
||||
StrTestEntity ste2 = getEntityManager().find(StrTestEntity.class, ste_id2);
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.hibernate.envers.test.entities.components.relations.OneToManyComponen
|
|||
import org.hibernate.envers.test.entities.components.relations.OneToManyComponent;
|
||||
import org.hibernate.envers.test.entities.StrTestEntity;
|
||||
import org.testng.annotations.Test;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
|
||||
import org.hibernate.ejb.Ejb3Configuration;
|
||||
|
||||
|
@ -47,7 +48,7 @@ public class OneToManyInComponent extends AbstractEntityTest {
|
|||
cfg.addAnnotatedClass(StrTestEntity.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
@BeforeClass(dependsOnMethods = "init")
|
||||
public void initData() {
|
||||
// Revision 1
|
||||
EntityManager em = getEntityManager();
|
||||
|
@ -89,12 +90,12 @@ public class OneToManyInComponent extends AbstractEntityTest {
|
|||
ste_id2 = ste2.getId();
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = "initData")
|
||||
@Test
|
||||
public void testRevisionsCounts() {
|
||||
assert Arrays.asList(2, 3).equals(getAuditReader().getRevisions(OneToManyComponentTestEntity.class, otmcte_id1));
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = "initData")
|
||||
@Test
|
||||
public void testHistoryOfId1() {
|
||||
StrTestEntity ste1 = getEntityManager().find(StrTestEntity.class, ste_id1);
|
||||
StrTestEntity ste2 = getEntityManager().find(StrTestEntity.class, ste_id2);
|
||||
|
|
Loading…
Reference in New Issue