Merged HEAD (5.1) to 5.1.N (5.1.1)

120273 skopf: ACE-4863 - Cannot save content back to Alfresco
   ACE-4887 - LockService.getLockState unaccessible
   Extended jUnit tests to test accessibility of getLockState method


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@120380 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Natalia Smintanca
2015-12-18 13:04:12 +00:00
parent 909823a936
commit e6ebb8109c

View File

@@ -981,8 +981,16 @@ public class LockServiceImplTest extends BaseSpringTest
// lock it as GOOD user
this.securedLockService.lock(testNode, LockType.WRITE_LOCK, 2 * 86400, lt, null);
// check lock state and status as GOOD user
assertNotNull(this.securedLockService.getLockState(testNode));
assertNotNull(this.securedLockService.getLockStatus(testNode));
TestWithUserUtils.authenticateUser(BAD_USER_NAME, PWD, rootNodeRef, this.authenticationService);
// check lock state and status as BAD user
assertNotNull(this.securedLockService.getLockState(testNode));
assertNotNull(this.securedLockService.getLockStatus(testNode));
try
{
@@ -996,6 +1004,10 @@ public class LockServiceImplTest extends BaseSpringTest
}
TestWithUserUtils.authenticateUser(AuthenticationUtil.getAdminUserName(), "admin", rootNodeRef, this.authenticationService);
// check lock state and status as ADMIN user
assertNotNull(this.securedLockService.getLockState(testNode));
assertNotNull(this.securedLockService.getLockStatus(testNode));
// try to unlock as ADMIN user
this.securedLockService.unlock(testNode);