Package org.nuiton.topia.replication
Class AbstractTopiaReplicationServiceTest
java.lang.Object
org.junit.Assert
org.nuiton.topia.replication.AbstractTopiaReplicationServiceTest
- Direct Known Subclasses:
TopiaReplicationOperationTest,TopiaReplicationServiceImplAllTest,TopiaReplicationServiceImplTest
public abstract class AbstractTopiaReplicationServiceTest
extends org.junit.Assert
TopiaReplicationServiceImplTest.
Created: 07 jun. 09 17:14:22
- Since:
- 2.2.0
- Version:
- $Id$
- Author:
- tchemit <chemit@codelutin.com>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static TopiaContextprotected static TopiaContextprotected TopiaContextImplementorprotected static booleanprotected org.nuiton.topia.replication.model.ReplicationModelprotected org.nuiton.topia.replication.TopiaReplicationService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidafter()protected voidassertDbEquals(TopiaEntityEnum[] contracts, TopiaContextImplementor ctxt, TopiaContextImplementor ctxt2) protected voidassertEntityEquals(TopiaEntity expected, TopiaEntity actual, Set<String> treated) protected abstract TopiaContextprotected abstract TopiaContextprotected voidcreateModel(TopiaEntity entity) protected TopiaContextcreateReplicateDb(Object contract) protected voidcreateSupportedAfterOperation(TopiaEntityEnum contract, TopiaEntity entity, Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, Object... parameters) protected voidcreateSupportedBeforeOperation(TopiaEntityEnum contract, TopiaEntity entity, Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, Object... parameters) protected voidcreateUnsupportedAfterOperation(TopiaEntityEnum contract, TopiaEntity entity, Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, Object... parameters) Deprecated.protected voidcreateUnsupportedBeforeOperation(TopiaEntityEnum contract, TopiaEntity entity, Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, Object... parameters) Deprecated.protected voiddetectAssociations(TopiaEntity entity, Object... expectedCouple) protected voiddetectDependencies(TopiaEntity entity, TopiaEntityEnum[]... expected) protected voiddetectDirectDependencies(TopiaEntity entity, Object... expectedCouple) protected voiddetectObjectsToDettach(TopiaEntity entity, Object... expected) protected voiddetectOperations(TopiaEntity entity, Object... expected) protected voiddetectShell(TopiaEntity entity, TopiaEntityEnum... expected) protected voiddetectTypes(TopiaEntity entity, Object... expectedCouple) protected voiddoReplicate(TopiaEntityEnum contract, TopiaEntity... entity) protected voidprotected voiddoReplicateWithComputedOrder(TopiaEntity... entity) protected abstract TopiaEntityEnum[]protected abstract org.apache.commons.logging.LoggetLog()protected org.nuiton.topia.replication.TopiaReplicationModelBuilderprotected voidgetOperation(Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, boolean shouldExist) protected FilegetTestDir(Class<?> testClass) protected Longprotected voidprepareModel(String... ids) protected voidprotected voidprepareModelWithComputedOrder(String... ids) voidsetUp()voidtearDown()voidTest of detectAssociations method, of class ReplicationModel.voidTest of detectDependencies method, of class ReplicationModel.voidTest of detectDirectDependencies method, of class ReplicationModel.voidTest of detectObjectsToDettach method, of class ReplicationModel.voidTest of detectOperations method, of class ReplicationModel.voidTest of detectShell method, of class ReplicationModel.voidTest of detectTypes method, of class ReplicationServiceImplementor.voidTest of doReplicate method, of class ReplicationService.voidTest of getOperation method, of class ReplicationServiceImplementor.protected <E extends TopiaEntity>
Eupdate(E e) Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertThrows, assertThrows, assertTrue, assertTrue, fail, fail
-
Field Details
-
context
-
ctxt
-
dstCtxt
-
service
protected org.nuiton.topia.replication.TopiaReplicationService service -
model
protected org.nuiton.topia.replication.model.ReplicationModel model -
init
protected static boolean init
-
-
Constructor Details
-
AbstractTopiaReplicationServiceTest
public AbstractTopiaReplicationServiceTest()
-
-
Method Details
-
after
- Throws:
Exception
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
getModelBuilder
protected org.nuiton.topia.replication.TopiaReplicationModelBuilder getModelBuilder() -
createDb2
- Throws:
Exception
-
createDb
- Throws:
Exception
-
createReplicateDb
- Throws:
Exception
-
getContracts
-
getLog
protected abstract org.apache.commons.logging.Log getLog() -
update
- Throws:
TopiaException
-
testDetectTypes
Test of detectTypes method, of class ReplicationServiceImplementor.- Throws:
Exception- if any error
-
testGetOperation
Test of getOperation method, of class ReplicationServiceImplementor.- Throws:
Exception- if any error
-
testDetectAssociations
Test of detectAssociations method, of class ReplicationModel.- Throws:
Exception- if any error
-
testDetectDirectDependencies
Test of detectDirectDependencies method, of class ReplicationModel.- Throws:
Exception- if any error
-
testDetectShell
Test of detectShell method, of class ReplicationModel.- Throws:
Exception- if any error
-
testDetectDependencies
Test of detectDependencies method, of class ReplicationModel.- Throws:
Exception- if any error
-
testDetectObjectsToDettach
Test of detectObjectsToDettach method, of class ReplicationModel.- Throws:
Exception- if any error
-
testDetectOperations
Test of detectOperations method, of class ReplicationModel.- Throws:
Exception- if any error
-
testDoReplicate
Test of doReplicate method, of class ReplicationService.- Throws:
Exception- if any error
-
detectTypes
- Throws:
TopiaException
-
getOperation
protected void getOperation(Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, boolean shouldExist) throws TopiaException - Throws:
TopiaException
-
detectAssociations
protected void detectAssociations(TopiaEntity entity, Object... expectedCouple) throws TopiaException - Throws:
TopiaException
-
detectDirectDependencies
protected void detectDirectDependencies(TopiaEntity entity, Object... expectedCouple) throws TopiaException - Throws:
TopiaException
-
detectShell
- Throws:
TopiaException
-
detectDependencies
protected void detectDependencies(TopiaEntity entity, TopiaEntityEnum[]... expected) throws TopiaException - Throws:
TopiaException
-
detectObjectsToDettach
- Throws:
TopiaException
-
detectOperations
- Throws:
TopiaException
-
doReplicate
- Throws:
Exception
-
doReplicateAll
- Throws:
Exception
-
doReplicateWithComputedOrder
- Throws:
Exception
-
assertDbEquals
protected void assertDbEquals(TopiaEntityEnum[] contracts, TopiaContextImplementor ctxt, TopiaContextImplementor ctxt2) throws TopiaException - Throws:
TopiaException
-
assertEntityEquals
-
createUnsupportedBeforeOperation
@Deprecated protected void createUnsupportedBeforeOperation(TopiaEntityEnum contract, TopiaEntity entity, Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, Object... parameters) throws Exception Deprecated.- Throws:
Exception
-
createUnsupportedAfterOperation
@Deprecated protected void createUnsupportedAfterOperation(TopiaEntityEnum contract, TopiaEntity entity, Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, Object... parameters) throws Exception Deprecated.- Throws:
Exception
-
createSupportedBeforeOperation
protected void createSupportedBeforeOperation(TopiaEntityEnum contract, TopiaEntity entity, Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, Object... parameters) throws Exception - Throws:
Exception
-
createSupportedAfterOperation
protected void createSupportedAfterOperation(TopiaEntityEnum contract, TopiaEntity entity, Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, Object... parameters) throws Exception - Throws:
Exception
-
getTestsTimeStamp
-
getTestDir
-
createModel
- Throws:
TopiaException
-
prepareModel
- Throws:
TopiaException
-
prepareModelAll
- Throws:
TopiaException
-
prepareModelWithComputedOrder
- Throws:
TopiaException
-