use of teammates.ui.controller.Action in project teammates by TEAMMATES.
the class BaseActionTest method verifyCannotMasquerade.
/**
* Verifies that the {@link Action} matching the {@code params} is not
* accessible to the logged in user masquerading as another user.
*/
protected void verifyCannotMasquerade(String... params) {
try {
Action c = gaeSimulation.getActionObject(getActionUri(), params);
c.executeAndPostProcess();
signalFailureToDetectException();
} catch (UnauthorizedAccessException e) {
ignoreExpectedException();
}
}
use of teammates.ui.controller.Action in project teammates by TEAMMATES.
the class BaseActionTest method verifyCanMasquerade.
/**
* Verifies that the {@link Action} matching the {@code params} is
* accessible to the logged in user masquerading as another user.
*/
protected void verifyCanMasquerade(String... params) {
Action c = gaeSimulation.getActionObject(getActionUri(), params);
assertTrue(c.isValidUser());
c.executeAndPostProcess();
}
use of teammates.ui.controller.Action in project teammates by TEAMMATES.
the class BaseActionTest method verifyAssumptionFailure.
/**
* Verifies that the {@code parameters} violates an assumption of the
* matching {@link Action}. e.g., missing a compulsory parameter.
*/
protected void verifyAssumptionFailure(String... parameters) {
try {
Action c = gaeSimulation.getActionObject(getActionUri(), parameters);
c.executeAndPostProcess();
signalFailureToDetectException();
} catch (AssertionError | InvalidPostParametersException e) {
ignoreExpectedException();
}
}
Aggregations