Package in.partake.controller

Examples of in.partake.controller.ActionProxy.execute()


public class FeedListPageActionTest extends ActionControllerTest {

    @Test
    public void testCalendar() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/feed");
        proxy.execute();

        assertResultSuccess(proxy);
    }
}
View Full Code Here


        addFormParameter(proxy, "userId", TestDataProvider.ATTENDANCE_ABSENT_USER_ID);
        addFormParameter(proxy, "ticketId", TestDataProvider.DEFAULT_EVENT_TICKET_ID.toString());
        addFormParameter(proxy, "status", "present");
        addValidSessionTokenToParameter(proxy);

        proxy.execute();
        assertResultOK(proxy);

        // Check status is changed.
        {
            UserTicket enrollment = loadEnrollment(TestDataProvider.ATTENDANCE_ABSENT_USER_ID, TestDataProvider.DEFAULT_EVENT_TICKET_ID);
View Full Code Here

        addFormParameter(proxy, "userId", ATTENDANCE_UNKNOWN_USER_ID);
        addFormParameter(proxy, "ticketId", DEFAULT_EVENT_TICKET_ID.toString());
        addFormParameter(proxy, "status", "absent");
        addValidSessionTokenToParameter(proxy);

        proxy.execute();
        assertResultOK(proxy);

        // Check status is changed.
        {
            UserTicket enrollment = loadEnrollment(ATTENDANCE_UNKNOWN_USER_ID, DEFAULT_EVENT_TICKET_ID);
View Full Code Here

        addFormParameter(proxy, "userId", TestDataProvider.ATTENDANCE_PRESENT_USER_ID);
        addFormParameter(proxy, "ticketId", TestDataProvider.DEFAULT_EVENT_TICKET_ID.toString());
        addFormParameter(proxy, "status", "unknown");
        addValidSessionTokenToParameter(proxy);

        proxy.execute();
        assertResultOK(proxy);

        // Check status is changed.
        {
            UserTicket enrollment = loadEnrollment(TestDataProvider.ATTENDANCE_PRESENT_USER_ID, TestDataProvider.DEFAULT_EVENT_TICKET_ID);
View Full Code Here

public class FeedRecentEventsActionTest extends ActionControllerTest {
    @Test
    public void testFeedRecentEvents() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/feed/all");
        proxy.execute();

        assertThat(Helpers.contentType(proxy.getResult()), is("application/rss+xml"));
        assertThat(Helpers.charset(proxy.getResult()), is("utf-8"));
        assertThat(Helpers.header("Content-Disposition", proxy.getResult()), is("inline"));
View Full Code Here

        addFormParameter(proxy, "userId", TestDataProvider.ATTENDANCE_UNKNOWN_USER_ID);
        addFormParameter(proxy, "ticketId", TestDataProvider.DEFAULT_EVENT_TICKET_ID.toString());
        addFormParameter(proxy, "status", "present");
        addValidSessionTokenToParameter(proxy);

        proxy.execute();
        assertResultLoginRequired(proxy);
    }

    @Test
    public void testUserIdRequired() throws Exception {
View Full Code Here

        // addFormParameter(proxy, "userId", TestDataProvider.ATTENDANCE_UNKNOWN_USER_ID);
        addFormParameter(proxy, "ticketId", TestDataProvider.DEFAULT_EVENT_TICKET_ID.toString());
        addFormParameter(proxy, "status", "present");
        addValidSessionTokenToParameter(proxy);

        proxy.execute();
        assertResultInvalid(proxy, UserErrorCode.MISSING_USER_ID);
    }

    @Test
    public void testEventIdRequired() throws Exception {
View Full Code Here

        addFormParameter(proxy, "userId", TestDataProvider.ATTENDANCE_UNKNOWN_USER_ID);
        // addFormParameter(proxy, "ticketId", TestDataProvider.DEFAULT_EVENT_TICKET_ID.toString());
        addFormParameter(proxy, "status", "present");
        addValidSessionTokenToParameter(proxy);

        proxy.execute();
        assertResultInvalid(proxy, UserErrorCode.MISSING_TICKET_ID);
    }

    @Test
    public void testStatusRequired() throws Exception {
View Full Code Here

        addFormParameter(proxy, "userId", TestDataProvider.ATTENDANCE_UNKNOWN_USER_ID);
        addFormParameter(proxy, "ticketId", TestDataProvider.DEFAULT_EVENT_TICKET_ID.toString());
        // addFormParameter(proxy, "status", "present");
        addValidSessionTokenToParameter(proxy);

        proxy.execute();
        assertResultInvalid(proxy, UserErrorCode.MISSING_ATTENDANCE_STATUS);
    }

    @Test
    public void testInvalidOwner() throws Exception {
View Full Code Here

        addFormParameter(proxy, "userId", TestDataProvider.ATTENDANCE_UNKNOWN_USER_ID);
        addFormParameter(proxy, "ticketId", TestDataProvider.DEFAULT_EVENT_TICKET_ID.toString());
        addFormParameter(proxy, "status", "present");
        addValidSessionTokenToParameter(proxy);

        proxy.execute();
        assertResultForbidden(proxy);
    }

    @Test
    public void testInvalidArgument() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.