mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Test for FreezeService
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@43583 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -26,10 +26,10 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
/**
|
||||
* Freeze Service Interface
|
||||
*
|
||||
* TODO Fill the implementation of this service out and consolidate existing freeze code. For now consider this a guide for a future service implementation.
|
||||
* TODO
|
||||
* Implementation used to consolidate freeze behaviours in 2.0.
|
||||
* When implementing consider application of freeze to 'any' node references, not just records and record folders. (Consider implecations for security and
|
||||
* capabilities)
|
||||
* When implementing consider application of freeze to 'any' node references, not just records and record folders.
|
||||
* (Consider implications for security and capabilities)
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.0
|
||||
|
@@ -182,9 +182,27 @@ public class FreezeServiceImplTest extends BaseRMTestCase
|
||||
assertNotNull(freezeService.getFreezeInitiator(recordTwo));
|
||||
assertFalse(freezeService.isFrozen(recordThree));
|
||||
|
||||
// FIXME
|
||||
freezeService.unFreeze(recordTwo);
|
||||
freezeService.unFreeze(recordOne);
|
||||
// Relinquish the first hold
|
||||
holdNodeRef = holdAssocs.iterator().next();
|
||||
freezeService.relinquish(holdNodeRef);
|
||||
|
||||
// Check the existing hold
|
||||
holdAssocs = freezeService.getHolds(filePlan);
|
||||
assertNotNull(holdAssocs);
|
||||
assertEquals(1, holdAssocs.size());
|
||||
|
||||
// Relinquish the second hold
|
||||
holdNodeRef = holdAssocs.iterator().next();
|
||||
freezeService.unFreeze(freezeService.getFrozen(holdNodeRef));
|
||||
|
||||
// All holds should be deleted
|
||||
holdAssocs = freezeService.getHolds(filePlan);
|
||||
assertEquals(0, holdAssocs.size());
|
||||
|
||||
// Check the nodes are unfrozen
|
||||
assertFalse(freezeService.isFrozen(recordOne));
|
||||
assertFalse(freezeService.isFrozen(recordTwo));
|
||||
assertFalse(freezeService.isFrozen(recordThree));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user