|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.springframework.test.ConditionalTestCase
org.springframework.test.AbstractSpringContextTests
org.springframework.test.AbstractSingleSpringContextTests
org.springframework.test.AbstractDependencyInjectionSpringContextTests
org.springframework.test.AbstractTransactionalSpringContextTests
org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
org.alfresco.util.BaseSpringTest
org.alfresco.util.BaseAlfrescoSpringTest
org.alfresco.repo.transfer.TransferServiceToBeRefactoredTest
public class TransferServiceToBeRefactoredTest
Unit test for TransferServiceImpl Contains some integration tests for the transfer service These tests need their transaction management to be re-factored then they can be re-instated into TransferServiceImplTest
Field Summary |
---|
Fields inherited from class org.alfresco.util.BaseAlfrescoSpringTest |
---|
actionService, authenticationComponent, authenticationService, nodeService, rootNodeRef, storeRef |
Fields inherited from class org.alfresco.util.BaseSpringTest |
---|
sessionFactory |
Fields inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests |
---|
jdbcTemplate |
Fields inherited from class org.springframework.test.AbstractTransactionalSpringContextTests |
---|
transactionDefinition, transactionManager, transactionStatus |
Fields inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests |
---|
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NO |
Fields inherited from class org.springframework.test.AbstractSingleSpringContextTests |
---|
applicationContext |
Fields inherited from class org.springframework.test.ConditionalTestCase |
---|
logger |
Constructor Summary | |
---|---|
TransferServiceToBeRefactoredTest()
|
Method Summary | |
---|---|
protected void |
onSetUp()
Called during the transaction setup |
void |
runBare()
|
void |
testCopyAlien()
Test the behaviour with respect to copy of alien nodes. |
void |
testCopyTransferredNode()
Test the behaviour with regard to copying transferred nodes. |
void |
testLocalAlienRestore()
Test restore of a local node. |
void |
testMultiRepoTransfer()
Transfer sync from multiple repos. |
void |
testMultiRepoTransferMove()
Test the transfer method behaviour with respect to move and alien nodes. |
void |
testReadOnlyFlag()
Transfer with read only flag Node tree for this test |
void |
testTransferInvadedByLocalAlienNodes()
Test the transfer method behaviour with respect to sync with (local) alien nodes. |
void |
testTransferReport()
Test the transfer report. |
void |
testTransferSyncNodes()
Test the transfer method behaviour with respect to sync folders - sending a complete set of nodes and implying delete from the absence of an association. |
void |
testTransferWithPermissions()
Test the transfer method with regard to permissions on a node. |
void |
testTwoRepoSync()
Transfer sync from multiple repos. |
Methods inherited from class org.alfresco.util.BaseAlfrescoSpringTest |
---|
createNode, onSetUpInTransaction, onTearDownInTransaction |
Methods inherited from class org.alfresco.util.BaseSpringTest |
---|
flushAndClear, getConfigLocations, getSession, loadContext, setSessionFactory |
Methods inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests |
---|
countRowsInTable, deleteFromTables, executeSqlScript, getJdbcTemplate, setComplete, setDataSource, setSqlScriptEncoding |
Methods inherited from class org.springframework.test.AbstractTransactionalSpringContextTests |
---|
endTransaction, isDefaultRollback, isRollback, onSetUpBeforeTransaction, onTearDown, onTearDownAfterTransaction, preventTransaction, setDefaultRollback, setTransactionDefinition, setTransactionManager, startNewTransaction |
Methods inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests |
---|
getAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariables |
Methods inherited from class org.springframework.test.AbstractSingleSpringContextTests |
---|
contextKey, createApplicationContext, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigPath, getConfigPaths, getLoadCount, loadContextLocations, prepareApplicationContext, setDirty, setUp, tearDown |
Methods inherited from class org.springframework.test.AbstractSpringContextTests |
---|
addContext, contextKeyString, getContext, hasCachedContext, isContextKeyEmpty, setDirty |
Methods inherited from class org.springframework.test.ConditionalTestCase |
---|
getDisabledTestCount, isDisabledInThisEnvironment, recordDisabled |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TransferServiceToBeRefactoredTest()
Method Detail |
---|
public void runBare() throws java.lang.Throwable
runBare
in class org.springframework.test.ConditionalTestCase
java.lang.Throwable
protected void onSetUp() throws java.lang.Exception
onSetUp
in class org.springframework.test.AbstractTransactionalSpringContextTests
java.lang.Exception
public void testTransferReport() throws java.lang.Exception
java.lang.Exception
public void testTransferSyncNodes() throws java.lang.Exception
java.lang.Exception
public void testTransferInvadedByLocalAlienNodes() throws java.lang.Exception
Tree of nodes A1 | | | A2 A3 (Content Node) B9 (Alien Content Node) | A4 A5 B10 (Alien Content Node) A6 | | A7 B11 (Alien Content Node) A8 B12 B13 (Alien Content Node) | B14Test steps -
java.lang.Exception
public void testLocalAlienRestore() throws java.lang.Exception
Tree of nodes A1 B1 | B2 | B3
- Add B2. A1 is alien.
- Delete B2. A1 not alien
- Restore B2. A1 is alien
- Add B3. A1 is alien
- Delete B2. A1 not alien
- Restore to B1. B2 and B3 not alien.
java.lang.Exception
public void testTransferWithPermissions() throws java.lang.Exception
Step 1: Create a node with a single permission Inherit:false Read, Admin, Allow Transfer
Step 2: Update it to have several permissions Inherit:false Read, Everyone, DENY Read, Admin, Allow
Step 3: Remove a permission Inherit:false Read, Admin, Allow
Step 4: Revert to inherit all permissions Inherit:true
This is a unit test so it does some shenanigans to send to the same instance of alfresco.
java.lang.Exception
public void testReadOnlyFlag() throws java.lang.Exception
A (Folder) | | B (Content) C (Folder) | D (Content)Step 1 transfer Nodes ABCD with read only flag set - content should all be locked on destination
Step 2 lock B (Content node) as user fred transfer (read only) - destination lock should change to Admin
Step 3 lock C (Folder) as user fred transfer (read only) - destination lock should change to Admin
Step 4 transfer without read only flag - locks should revert from Admin to Fred.
Step 5 remove locks on A and B - transfer without read only flag - content should all be unlocked.
java.lang.Exception
public void testTwoRepoSync() throws java.lang.Exception
java.lang.Exception
public void testMultiRepoTransfer() throws java.lang.Exception
A1 B1 C1 | | A2/images A2 Dummy/images | | A3 C3 Destination B1 | A2/images | | C3 A3 | C4Step 1. Transfer from A to B. Step 2. Transfer from C to B (crossing over on A2Dest) Step 3. Invade A3Dest via C4 Step 4. Delete C4. Sync from C Step 5. Delete C3 - A2 dest images folder uninvaded.
java.lang.Exception
public void testMultiRepoTransferMove() throws java.lang.Exception
B1 | | | C2(p1) C3(p2) A4 | A5 | B6Step 1: Tansfer in C's nodes to Repo B Step 2. Transfer in A's nodes to Repo B Setup tree above. Validat that A2 is child of C2 dest. A4 is a child of B1 Step 3. Move A5 from C2 to C3 via transfer. C2Dest should stop being invaded by A5, C3Dest should be invaded by A5. Step 4. Invade A5 by B6. Move from C3 to C2 via transfer. C2Dest should be invaded by A and B. C3Dest should not be invaded. Step 5. Move A5 to A4. A4 should be invaded by B due to B6 but not by A. C2Dest should not be invaded.
java.lang.Exception
public void testCopyTransferredNode() throws java.lang.Exception
Transfer node read only
Copy transferred node.
New node should not be locked and should not be transferred.
This is a unit test so it does some shenanigans to send to the same instance of alfresco.
java.lang.Exception
public void testCopyAlien() throws java.lang.Exception
B1 | | | C2(p1) C3(p2) A4 | A5 | B6Step 1: Tansfer in C's nodes to Repo B Step 2. Transfer in A's nodes to Repo B Setup tree above. Validat that A2 is child of C2 dest. A4 is a child of B1 Step 3. Copy A5 from C2 to C3. C2Dest should still be invaded by A5 C3Dest should be invaded by A5(copy 1) which is now a "B" invader. Step 4. Copy A5 from C2 to A4. C2Dest should still be invaded by A5 A4Dest should be invaded by A5(copy 2) which is now a "B" invader. Step 5. Invade A5 dest with B6. Copy A5(Dest) to B1 (A5 Copy 3) B1 should not be invaded. A5 Copy 3 not invaded. B6 Copy not invaded. Step 6. Invade A5 dest with B6. Copy A5(Dest) to B1 (A5 Copy 3) with children B1 should not be invaded. A5 Copy 4 not invaded. B6 Copy not invaded.
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |