public class AuthorizationRule extends java.lang.Object implements org.junit.rules.TestRule, Authorization
Rule to be used with MultiUserTestRunner
to define whether a test passes or
fails.
Constructor and Description |
---|
AuthorizationRule() |
Modifier and Type | Method and Description |
---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
WhenThen<TestExpectation> |
given(FunctionCall functionCall)
Starts constructing expectation for a function call.
|
<VALUE_TYPE> |
given(ReturnValueCall<VALUE_TYPE> returnValueCall)
Starts constructing expectation for a return value call.
|
void |
markExpectationConstructed() |
void |
setRole(UserIdentifier producerIdentifier,
UserIdentifier consumerIdentifier) |
void |
setUserRoleIT(UserRoleIT userRoleIT) |
public void setUserRoleIT(UserRoleIT userRoleIT)
setUserRoleIT
in interface Authorization
public void setRole(UserIdentifier producerIdentifier, UserIdentifier consumerIdentifier)
setRole
in interface Authorization
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
apply
in interface org.junit.rules.TestRule
public void markExpectationConstructed()
markExpectationConstructed
in interface Authorization
public WhenThen<TestExpectation> given(FunctionCall functionCall)
given
in interface Authorization
functionCall
- Call to testpublic <VALUE_TYPE> WhenThen<TestValueExpectation<VALUE_TYPE>> given(ReturnValueCall<VALUE_TYPE> returnValueCall)
given
in interface Authorization
returnValueCall
- Call to test