use of teammates.ui.controller.StudentProfilePictureEditAction in project teammates by TEAMMATES.
the class StudentProfilePictureEditActionTest method testActionForEmptyHeight.
private void testActionForEmptyHeight(AccountAttributes student) {
______TS("Failure case: empty parameter - height");
String expectedLogMessage = getExpectedLogMessageEmptyDimensions(student);
String expectedUrl = getPageResultDestination(Const.ActionURIs.STUDENT_PROFILE_PAGE, true, student.googleId);
String[] submissionParams = createValidParamsForProfilePictureEdit();
submissionParams[9] = "";
StudentProfilePictureEditAction action = getAction(submissionParams);
RedirectResult result = getRedirectResult(action);
AssertHelper.assertLogMessageEquals(expectedLogMessage, action.getLogMessage());
assertEquals(expectedUrl, result.getDestinationWithParams());
}
use of teammates.ui.controller.StudentProfilePictureEditAction in project teammates by TEAMMATES.
the class StudentProfilePictureEditActionTest method testActionForZeroWidth.
private void testActionForZeroWidth(AccountAttributes student) {
______TS("Failure case: zero width");
String expectedLogMessage = getExpectedLogMessageZeroDimensions(student);
String expectedUrl = getPageResultDestination(Const.ActionURIs.STUDENT_PROFILE_PAGE, true, student.googleId);
String[] submissionParams = createValidParamsForProfilePictureEdit();
submissionParams[11] = "0";
StudentProfilePictureEditAction action = getAction(submissionParams);
RedirectResult result = getRedirectResult(action);
AssertHelper.assertLogMessageEquals(expectedLogMessage, action.getLogMessage());
assertEquals(expectedUrl, result.getDestinationWithParams());
}
use of teammates.ui.controller.StudentProfilePictureEditAction in project teammates by TEAMMATES.
the class StudentProfilePictureEditActionTest method testActionForEmptyBottomY.
private void testActionForEmptyBottomY(AccountAttributes student) {
______TS("Failure case: empty parameter - bottomy");
String expectedLogMessage = getExpectedLogMessageEmptyCoords(student);
String expectedUrl = getPageResultDestination(Const.ActionURIs.STUDENT_PROFILE_PAGE, true, student.googleId);
String[] submissionParams = createValidParamsForProfilePictureEdit();
submissionParams[7] = "";
StudentProfilePictureEditAction action = getAction(submissionParams);
RedirectResult result = getRedirectResult(action);
AssertHelper.assertLogMessageEquals(expectedLogMessage, action.getLogMessage());
assertEquals(expectedUrl, result.getDestinationWithParams());
}
use of teammates.ui.controller.StudentProfilePictureEditAction in project teammates by TEAMMATES.
the class StudentProfilePictureEditActionTest method testActionForEmptyWidth.
private void testActionForEmptyWidth(AccountAttributes student) {
______TS("Failure case: empty parameter - width");
String expectedLogMessage = getExpectedLogMessageEmptyDimensions(student);
String expectedUrl = getPageResultDestination(Const.ActionURIs.STUDENT_PROFILE_PAGE, true, student.googleId);
String[] submissionParams = createValidParamsForProfilePictureEdit();
submissionParams[11] = "";
StudentProfilePictureEditAction action = getAction(submissionParams);
RedirectResult result = getRedirectResult(action);
AssertHelper.assertLogMessageEquals(expectedLogMessage, action.getLogMessage());
assertEquals(expectedUrl, result.getDestinationWithParams());
}
use of teammates.ui.controller.StudentProfilePictureEditAction in project teammates by TEAMMATES.
the class StudentProfilePictureEditActionTest method testActionForEmptyTopY.
private void testActionForEmptyTopY(AccountAttributes student) {
______TS("Failure case: empty parameter - topy");
String expectedLogMessage = getExpectedLogMessageEmptyCoords(student);
String expectedUrl = getPageResultDestination(Const.ActionURIs.STUDENT_PROFILE_PAGE, true, student.googleId);
String[] submissionParams = createValidParamsForProfilePictureEdit();
submissionParams[5] = "";
StudentProfilePictureEditAction action = getAction(submissionParams);
RedirectResult result = getRedirectResult(action);
AssertHelper.assertLogMessageEquals(expectedLogMessage, action.getLogMessage());
assertEquals(expectedUrl, result.getDestinationWithParams());
}
Aggregations