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
Fields Modifier and Type Field Description protected static TopiaContextcontextprotected static TopiaContextctxtprotected TopiaContextImplementordstCtxtprotected static booleaninitprotected org.nuiton.topia.replication.model.ReplicationModelmodelprotected org.nuiton.topia.replication.TopiaReplicationServiceservice -
Constructor Summary
Constructors Constructor Description AbstractTopiaReplicationServiceTest() -
Method Summary
Modifier and Type Method Description static voidafter()protected voidassertDbEquals(TopiaEntityEnum[] contracts, TopiaContextImplementor ctxt, TopiaContextImplementor ctxt2)protected voidassertEntityEquals(TopiaEntity expected, TopiaEntity actual, java.util.Set<java.lang.String> treated)protected abstract TopiaContextcreateDb(java.lang.String name)protected abstract TopiaContextcreateDb2(java.lang.String name)protected voidcreateModel(TopiaEntity entity)protected TopiaContextcreateReplicateDb(java.lang.Object contract)protected voidcreateSupportedAfterOperation(TopiaEntityEnum contract, TopiaEntity entity, java.lang.Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, java.lang.Object... parameters)protected voidcreateSupportedBeforeOperation(TopiaEntityEnum contract, TopiaEntity entity, java.lang.Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, java.lang.Object... parameters)protected voidcreateUnsupportedAfterOperation(TopiaEntityEnum contract, TopiaEntity entity, java.lang.Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, java.lang.Object... parameters)Deprecated.protected voidcreateUnsupportedBeforeOperation(TopiaEntityEnum contract, TopiaEntity entity, java.lang.Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, java.lang.Object... parameters)Deprecated.protected voiddetectAssociations(TopiaEntity entity, java.lang.Object... expectedCouple)protected voiddetectDependencies(TopiaEntity entity, TopiaEntityEnum[]... expected)protected voiddetectDirectDependencies(TopiaEntity entity, java.lang.Object... expectedCouple)protected voiddetectObjectsToDettach(TopiaEntity entity, java.lang.Object... expected)protected voiddetectOperations(TopiaEntity entity, java.lang.Object... expected)protected voiddetectShell(TopiaEntity entity, TopiaEntityEnum... expected)protected voiddetectTypes(TopiaEntity entity, java.lang.Object... expectedCouple)protected voiddoReplicate(TopiaEntityEnum contract, TopiaEntity... entity)protected voiddoReplicateAll()protected voiddoReplicateWithComputedOrder(TopiaEntity... entity)protected abstract TopiaEntityEnum[]getContracts()protected abstract org.apache.commons.logging.LoggetLog()protected org.nuiton.topia.replication.TopiaReplicationModelBuildergetModelBuilder()protected voidgetOperation(java.lang.Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, boolean shouldExist)protected java.io.FilegetTestDir(java.lang.Class<?> testClass)protected java.lang.LonggetTestsTimeStamp()protected voidprepareModel(java.lang.String... ids)protected voidprepareModelAll()protected voidprepareModelWithComputedOrder(java.lang.String... ids)voidsetUp()voidtearDown()voidtestDetectAssociations()Test of detectAssociations method, of class ReplicationModel.voidtestDetectDependencies()Test of detectDependencies method, of class ReplicationModel.voidtestDetectDirectDependencies()Test of detectDirectDependencies method, of class ReplicationModel.voidtestDetectObjectsToDettach()Test of detectObjectsToDettach method, of class ReplicationModel.voidtestDetectOperations()Test of detectOperations method, of class ReplicationModel.voidtestDetectShell()Test of detectShell method, of class ReplicationModel.voidtestDetectTypes()Test of detectTypes method, of class ReplicationServiceImplementor.voidtestDoReplicate()Test of doReplicate method, of class ReplicationService.voidtestGetOperation()Test 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
-
Constructor Details
-
AbstractTopiaReplicationServiceTest
public AbstractTopiaReplicationServiceTest()
-
-
Method Details
-
after
public static void after() throws java.lang.Exception- Throws:
java.lang.Exception
-
setUp
public void setUp() throws java.lang.Exception- Throws:
java.lang.Exception
-
tearDown
public void tearDown() throws java.lang.Exception- Throws:
java.lang.Exception
-
getModelBuilder
protected org.nuiton.topia.replication.TopiaReplicationModelBuilder getModelBuilder() -
createDb2
- Throws:
java.lang.Exception
-
createDb
- Throws:
java.lang.Exception
-
createReplicateDb
- Throws:
java.lang.Exception
-
getContracts
-
getLog
protected abstract org.apache.commons.logging.Log getLog() -
update
- Throws:
TopiaException
-
testDetectTypes
public void testDetectTypes() throws java.lang.ExceptionTest of detectTypes method, of class ReplicationServiceImplementor.- Throws:
java.lang.Exception- if any error
-
testGetOperation
public void testGetOperation() throws java.lang.ExceptionTest of getOperation method, of class ReplicationServiceImplementor.- Throws:
java.lang.Exception- if any error
-
testDetectAssociations
public void testDetectAssociations() throws java.lang.ExceptionTest of detectAssociations method, of class ReplicationModel.- Throws:
java.lang.Exception- if any error
-
testDetectDirectDependencies
public void testDetectDirectDependencies() throws java.lang.ExceptionTest of detectDirectDependencies method, of class ReplicationModel.- Throws:
java.lang.Exception- if any error
-
testDetectShell
public void testDetectShell() throws java.lang.ExceptionTest of detectShell method, of class ReplicationModel.- Throws:
java.lang.Exception- if any error
-
testDetectDependencies
public void testDetectDependencies() throws java.lang.ExceptionTest of detectDependencies method, of class ReplicationModel.- Throws:
java.lang.Exception- if any error
-
testDetectObjectsToDettach
public void testDetectObjectsToDettach() throws java.lang.ExceptionTest of detectObjectsToDettach method, of class ReplicationModel.- Throws:
java.lang.Exception- if any error
-
testDetectOperations
public void testDetectOperations() throws java.lang.ExceptionTest of detectOperations method, of class ReplicationModel.- Throws:
java.lang.Exception- if any error
-
testDoReplicate
public void testDoReplicate() throws java.lang.ExceptionTest of doReplicate method, of class ReplicationService.- Throws:
java.lang.Exception- if any error
-
detectTypes
protected void detectTypes(TopiaEntity entity, java.lang.Object... expectedCouple) throws TopiaException- Throws:
TopiaException
-
getOperation
protected void getOperation(java.lang.Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, boolean shouldExist) throws TopiaException- Throws:
TopiaException
-
detectAssociations
protected void detectAssociations(TopiaEntity entity, java.lang.Object... expectedCouple) throws TopiaException- Throws:
TopiaException
-
detectDirectDependencies
protected void detectDirectDependencies(TopiaEntity entity, java.lang.Object... expectedCouple) throws TopiaException- Throws:
TopiaException
-
detectShell
- Throws:
TopiaException
-
detectDependencies
protected void detectDependencies(TopiaEntity entity, TopiaEntityEnum[]... expected) throws TopiaException- Throws:
TopiaException
-
detectObjectsToDettach
protected void detectObjectsToDettach(TopiaEntity entity, java.lang.Object... expected) throws TopiaException- Throws:
TopiaException
-
detectOperations
protected void detectOperations(TopiaEntity entity, java.lang.Object... expected) throws TopiaException- Throws:
TopiaException
-
doReplicate
protected void doReplicate(TopiaEntityEnum contract, TopiaEntity... entity) throws java.lang.Exception- Throws:
java.lang.Exception
-
doReplicateAll
protected void doReplicateAll() throws java.lang.Exception- Throws:
java.lang.Exception
-
doReplicateWithComputedOrder
- Throws:
java.lang.Exception
-
assertDbEquals
protected void assertDbEquals(TopiaEntityEnum[] contracts, TopiaContextImplementor ctxt, TopiaContextImplementor ctxt2) throws TopiaException- Throws:
TopiaException
-
assertEntityEquals
protected void assertEntityEquals(TopiaEntity expected, TopiaEntity actual, java.util.Set<java.lang.String> treated) -
createUnsupportedBeforeOperation
@Deprecated protected void createUnsupportedBeforeOperation(TopiaEntityEnum contract, TopiaEntity entity, java.lang.Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, java.lang.Object... parameters) throws java.lang.ExceptionDeprecated.- Throws:
java.lang.Exception
-
createUnsupportedAfterOperation
@Deprecated protected void createUnsupportedAfterOperation(TopiaEntityEnum contract, TopiaEntity entity, java.lang.Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, java.lang.Object... parameters) throws java.lang.ExceptionDeprecated.- Throws:
java.lang.Exception
-
createSupportedBeforeOperation
protected void createSupportedBeforeOperation(TopiaEntityEnum contract, TopiaEntity entity, java.lang.Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, java.lang.Object... parameters) throws java.lang.Exception- Throws:
java.lang.Exception
-
createSupportedAfterOperation
protected void createSupportedAfterOperation(TopiaEntityEnum contract, TopiaEntity entity, java.lang.Class<? extends org.nuiton.topia.replication.TopiaReplicationOperation> operationClass, java.lang.Object... parameters) throws java.lang.Exception- Throws:
java.lang.Exception
-
getTestsTimeStamp
protected java.lang.Long getTestsTimeStamp() -
getTestDir
protected java.io.File getTestDir(java.lang.Class<?> testClass) -
createModel
- Throws:
TopiaException
-
prepareModel
- Throws:
TopiaException
-
prepareModelAll
- Throws:
TopiaException
-
prepareModelWithComputedOrder
- Throws:
TopiaException
-