HHH-8505: Small improvements to tests
This commit is contained in:
parent
6bc1d2ef01
commit
631616ec74
|
@ -12,6 +12,7 @@ import org.junit.Test;
|
|||
|
||||
import org.hibernate.QueryException;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.envers.exception.AuditException;
|
||||
import org.hibernate.envers.query.AuditEntity;
|
||||
import org.hibernate.envers.test.BaseEnversFunctionalTestCase;
|
||||
import org.hibernate.envers.test.Priority;
|
||||
|
@ -290,15 +291,14 @@ public class AuditedDynamicComponentsAdvancedCasesTest extends BaseEnversFunctio
|
|||
getAuditReader().createQuery()
|
||||
.forEntitiesAtRevision( AdvancedEntity.class, 1 )
|
||||
.add(
|
||||
AuditEntity.property( "dynamicConfiguration_" + INTERNAL_LIST )
|
||||
.eq( entity.getDynamicConfiguration().get( INTERNAL_LIST ) )
|
||||
AuditEntity.property( "dynamicConfiguration_" + INTERNAL_MAP_WITH_MANY_TO_MANY )
|
||||
.eq( entity.getDynamicConfiguration().get( INTERNAL_MAP_WITH_MANY_TO_MANY ) )
|
||||
)
|
||||
.getResultList();
|
||||
Assert.fail();
|
||||
}
|
||||
catch ( QueryException e ) {
|
||||
e.printStackTrace();
|
||||
|
||||
catch ( AuditException e ) {
|
||||
Assert.assertEquals( "This type of relation (org.hibernate.envers.test.integration.components.dynamic.AdvancedEntity.dynamicConfiguration_internalMapWithEntities) isn't supported and can't be used in queries." , e.getMessage());
|
||||
}
|
||||
catch ( Exception e ) {
|
||||
Assert.fail();
|
||||
|
|
|
@ -111,6 +111,7 @@ public class SanityCheckTest extends BaseEnversFunctionalTestCase {
|
|||
Assert.fail();
|
||||
}
|
||||
catch ( AuditException e ) {
|
||||
Assert.assertEquals( "This type of relation (org.hibernate.envers.test.integration.components.dynamic.PlainEntity.component_manyToManyList) isn't supported and can't be used in queries." , e.getMessage());
|
||||
}
|
||||
catch ( Exception e ) {
|
||||
Assert.fail();
|
||||
|
@ -142,10 +143,8 @@ public class SanityCheckTest extends BaseEnversFunctionalTestCase {
|
|||
Assert.fail();
|
||||
}
|
||||
catch ( QueryException e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
Assert.fail();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue