Added test to check that restore status was picking up missing destination node

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2831 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-05-10 21:53:36 +00:00
parent f5716bbe9e
commit d5bd90b96b

View File

@@ -165,11 +165,11 @@ public class ArchiveAndRestoreTest extends TestCase
* Create the following:
* <pre>
* root
* / | \
* / | \
* / | \
* / | \
* A <-> B X
* / |
* / |
* / |
* / |
* A <-> B
* |\ /|
* | \ / |
* | \/ |
@@ -500,6 +500,17 @@ public class ArchiveAndRestoreTest extends TestCase
txn.begin();
}
public void testRestoreToMissingParent() throws Exception
{
nodeService.deleteNode(a);
nodeService.deleteNode(b);
commitAndBeginNewTransaction();
// attempt to restore b_ to a
RestoreNodeReport report = nodeArchiveService.restoreArchivedNode(b_, a, null, null);
assertEquals("Incorrect report status", RestoreStatus.FAILURE_INVALID_PARENT, report.getStatus());
}
public void testMassRestore() throws Exception
{
nodeService.deleteNode(a);