Search in sources :

Example 1 with AdminAccountDetailsPageAction

use of teammates.ui.controller.AdminAccountDetailsPageAction in project teammates by TEAMMATES.

the class AdminAccountDetailsPageActionTest method testExecuteAndPostProcess.

@Override
@Test
public void testExecuteAndPostProcess() {
    ______TS("case: view instructor account details");
    InstructorAttributes instructor1OfCourse1 = typicalBundle.instructors.get("instructor1OfCourse1");
    String[] submissionParams = new String[] { Const.ParamsNames.INSTRUCTOR_ID, instructor1OfCourse1.googleId };
    final String adminUserId = "admin.user";
    gaeSimulation.loginAsAdmin(adminUserId);
    AdminAccountDetailsPageAction action = getAction(submissionParams);
    ShowPageResult result = getShowPageResult(action);
    assertEquals("", result.getStatusMessage());
    assertEquals(getPageResultDestination(Const.ViewURIs.ADMIN_ACCOUNT_DETAILS, false, adminUserId), result.getDestinationWithParams());
    assertFalse(result.isError);
    AdminAccountDetailsPageData data = (AdminAccountDetailsPageData) result.data;
    assertEquals(instructor1OfCourse1.googleId, data.getAccountInformation().googleId);
}
Also used : AdminAccountDetailsPageData(teammates.ui.pagedata.AdminAccountDetailsPageData) ShowPageResult(teammates.ui.controller.ShowPageResult) AdminAccountDetailsPageAction(teammates.ui.controller.AdminAccountDetailsPageAction) InstructorAttributes(teammates.common.datatransfer.attributes.InstructorAttributes) Test(org.testng.annotations.Test)

Aggregations

Test (org.testng.annotations.Test)1 InstructorAttributes (teammates.common.datatransfer.attributes.InstructorAttributes)1 AdminAccountDetailsPageAction (teammates.ui.controller.AdminAccountDetailsPageAction)1 ShowPageResult (teammates.ui.controller.ShowPageResult)1 AdminAccountDetailsPageData (teammates.ui.pagedata.AdminAccountDetailsPageData)1