use of teammates.ui.controller.StudentProfilePageAction in project teammates by TEAMMATES.
the class StudentProfilePageActionTest method testActionSuccess.
private void testActionSuccess(AccountAttributes student, String caseDescription) {
gaeSimulation.loginAsStudent(student.googleId);
______TS(caseDescription);
String[] submissionParams = new String[] {};
StudentProfilePageAction action = getAction(submissionParams);
ShowPageResult result = getShowPageResult(action);
AssertHelper.assertContains(getPageResultDestination(Const.ViewURIs.STUDENT_PROFILE_PAGE, false, student.googleId), result.getDestinationWithParams());
assertFalse(result.isError);
assertEquals("", result.getStatusMessage());
verifyAccountsAreSame(student, result);
verifyLogMessage(student, action, false);
}
use of teammates.ui.controller.StudentProfilePageAction in project teammates by TEAMMATES.
the class StudentProfilePageActionTest method testActionInMasquerade.
private void testActionInMasquerade(AccountAttributes student) {
gaeSimulation.loginAsAdmin("admin.user");
______TS("Typical case: masquerade mode");
String[] submissionParams = new String[] { Const.ParamsNames.STUDENT_PROFILE_PHOTOEDIT, "false", Const.ParamsNames.USER_ID, student.googleId };
StudentProfilePageAction action = getAction(addUserIdToParams(student.googleId, submissionParams));
ShowPageResult result = getShowPageResult(action);
AssertHelper.assertContains(getPageResultDestination(Const.ViewURIs.STUDENT_PROFILE_PAGE, false, student.googleId), result.getDestinationWithParams());
assertFalse(result.isError);
assertEquals("", result.getStatusMessage());
verifyAccountsAreSame(student, result);
verifyLogMessage(student, action, true);
}
Aggregations