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/HEAD/root@120273 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Stefan Kopf
2015-12-16 13:10:11 +00:00
parent b0801bfbb4
commit cd83cef295

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);