Class EntityTestSupport
java.lang.Object
org.springframework.test.context.testng.AbstractTestNGSpringContextTests
it.tidalwave.datamanager.dao.impl.jpa.EntityTestSupport
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.testng.IHookable
,org.testng.ITestNGListener
- Direct Known Subclasses:
BackupEntityTest
,BackupFileEntityTest
,FingerprintEntityTest
,ManagedFileEntityTest
public class EntityTestSupport
extends org.springframework.test.context.testng.AbstractTestNGSpringContextTests
Adapted from
...
- Author:
- Fabrizio Giudici
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests
applicationContext, logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected <T> void
assertEqualityConsistency
(Class<T> entityClass, T entity, EntityTestSupport.Options... options) protected void
protected <S> S
runInTxWithResult
(Function<? super jakarta.persistence.EntityManager, S> task) Methods inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests
run, setApplicationContext, springTestContextAfterTestClass, springTestContextAfterTestMethod, springTestContextBeforeTestClass, springTestContextBeforeTestMethod, springTestContextPrepareTestInstance
-
Constructor Details
-
EntityTestSupport
public EntityTestSupport()
-
-
Method Details
-
assertEqualityConsistency
protected <T> void assertEqualityConsistency(@Nonnull Class<T> entityClass, @Nonnull T entity, @Nonnull EntityTestSupport.Options... options) -
runInTx
-
runInTxWithResult
@Nonnull protected <S> S runInTxWithResult(@Nonnull Function<? super jakarta.persistence.EntityManager, S> task)
-