Package org.mycore.access
Class MCRAccessMock
java.lang.Object
org.mycore.access.MCRAccessMock
- All Implemented Interfaces:
MCRAccessInterface
Can be used to write Tests against the
MCRAccessManager
.
Just add MCR.Access.Class with MCRAccessMock.class.getName() to the test-properties in the overwritten
MCRTestCase
getTestProperties() method.-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkPermission
(String permission) boolean
checkPermission
(String id, String permission) boolean
checkPermission
(String id, String permission, MCRUserInformation userInfo) boolean
checkPermissionForUser
(String permission, MCRUserInformation userInfo) static void
static boolean
static void
setMethodResult
(boolean methodResult)
-
Constructor Details
-
MCRAccessMock
public MCRAccessMock()
-
-
Method Details
-
getCheckPermissionCalls
-
clearCheckPermissionCallsList
public static void clearCheckPermissionCallsList() -
getMethodResult
public static boolean getMethodResult() -
setMethodResult
public static void setMethodResult(boolean methodResult) -
checkPermission
- Specified by:
checkPermission
in interfaceMCRAccessInterface
-
checkPermission
- Specified by:
checkPermission
in interfaceMCRAccessInterface
-
checkPermissionForUser
- Specified by:
checkPermissionForUser
in interfaceMCRAccessInterface
-
checkPermission
- Specified by:
checkPermission
in interfaceMCRAccessInterface
-