Class AuthorizationTestRule
java.lang.Object
org.junit.rules.TestWatcher
org.operaton.bpm.engine.test.api.authorization.util.AuthorizationTestBaseRule
org.operaton.bpm.engine.test.api.authorization.util.AuthorizationTestRule
- All Implemented Interfaces:
org.junit.rules.TestRule
- Author:
- Thorben Lindhauer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AuthorizationExceptionInterceptorprotected CommandExecutorprotected AuthorizationScenarioInstanceFields inherited from class org.operaton.bpm.engine.test.api.authorization.util.AuthorizationTestBaseRule
authorizations, engineRule, groups, users -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<AuthorizationScenario[]>asParameters(AuthorizationScenario... scenarios) booleanassertScenario(AuthorizationScenario scenario) Assert the scenario conditions.protected voidfinished(org.junit.runner.Description description) init(AuthorizationScenario scenario) booleanbooleanNo exception was expected and none was thrownvoidstart(AuthorizationScenario scenario) voidprotected voidstarting(org.junit.runner.Description description) Methods inherited from class org.operaton.bpm.engine.test.api.authorization.util.AuthorizationTestBaseRule
createAuthorization, createGrantAuthorization, createRevokeAuthorization, createUserAndGroup, deleteManagedAuthorizations, deleteUsersAndGroups, disableAuthorization, enableAuthorization, manageAuthorizationMethods inherited from class org.junit.rules.TestWatcher
apply, failed, skipped, skipped, succeeded
-
Field Details
-
interceptor
-
replacedCommandExecutor
-
scenarioInstance
-
-
Constructor Details
-
AuthorizationTestRule
-
-
Method Details
-
start
-
start
public void start(AuthorizationScenario scenario, String userId, Map<String, String> resourceBindings) -
assertScenario
Assert the scenario conditions. If no exception or the expected one was thrown.- Parameters:
scenario- the scenario to assert on- Returns:
- true if no exception was thrown, false otherwise
-
scenarioSucceeded
public boolean scenarioSucceeded()No exception was expected and none was thrown -
scenarioFailed
public boolean scenarioFailed() -
starting
protected void starting(org.junit.runner.Description description) - Overrides:
startingin classorg.junit.rules.TestWatcher
-
finished
protected void finished(org.junit.runner.Description description) - Overrides:
finishedin classAuthorizationTestBaseRule
-
asParameters
-
init
public AuthorizationTestRule.AuthorizationScenarioInstanceBuilder init(AuthorizationScenario scenario)
-