Package in.partake.controller

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


        addValidSessionTokenToParameter(proxy);
        addFormParameter(proxy, "eventId", TestDataProvider.DEFAULT_EVENT_ID);
        addFormParameter(proxy, "comment", "   ");

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

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


        addValidSessionTokenToParameter(proxy);
        addFormParameter(proxy, "eventId", TestDataProvider.DEFAULT_EVENT_ID);
        addFormParameter(proxy, "comment", buffer.toString());

        proxy.execute();
        assertResultInvalid(proxy, UserErrorCode.INVALID_COMMENT_TOOLONG);
    }
}
View Full Code Here

        ActionProxy proxy = getActionProxy(POST, "/api/event/remove");
        loginAs(proxy, EVENT_OWNER_ID);
        addParameter(proxy, "eventId", DEFAULT_EVENT_ID);
        addValidSessionTokenToParameter(proxy);

        proxy.execute();
        assertResultOK(proxy);
    }

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

        ActionProxy proxy = getActionProxy(POST, "/api/event/remove");
        loginAs(proxy, EVENT_EDITOR_ID);
        addParameter(proxy, "eventId", DEFAULT_EVENT_ID);
        addValidSessionTokenToParameter(proxy);

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

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

    public void testToRemoveWithoutValidSessionToken() throws Exception {
        ActionProxy proxy = getActionProxy(POST, "/api/event/remove");
        loginAs(proxy, EVENT_OWNER_ID);
        addParameter(proxy, "eventId", DEFAULT_EVENT_ID);

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

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

    @Test
    public void testToRemoveWithoutLogin() throws Exception {
        ActionProxy proxy = getActionProxy(POST, "/api/event/remove");
        addParameter(proxy, "eventId", DEFAULT_EVENT_ID);

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

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

        ActionProxy proxy = getActionProxy(POST, "/api/event/remove");
        loginAs(proxy, EVENT_OWNER_ID);
        addParameter(proxy, "eventId", INVALID_EVENT_ID);
        addValidSessionTokenToParameter(proxy);

        proxy.execute();
        assertResultInvalid(proxy, UserErrorCode.INVALID_EVENT_ID);
    }
}
View Full Code Here

        addFormParameter(proxy, "priceType[]", new String[] { "free" });
        addFormParameter(proxy, "price[]", new String[] { "0" });
        addFormParameter(proxy, "amountType[]", new String[] { "unlimited" });
        addFormParameter(proxy, "amount[]", new String[] { "0" });

        proxy.execute();
        assertResultOK(proxy);

        EventEx modified = loadEventEx(UNPUBLISHED_EVENT_ID);
        List<EventTicket> tickets = modified.getTickets();
View Full Code Here

        // Changed to limited.
        addFormParameter(proxy, "amountType[]", new String[] { "limited" });
        addFormParameter(proxy, "amount[]", new String[] { "10" });

        proxy.execute();
        assertResultOK(proxy);

        EventEx modified = loadEventEx(UNPUBLISHED_EVENT_ID);
        List<EventTicket> tickets = modified.getTickets();
View Full Code Here

        // Changed to limited.
        addFormParameter(proxy, "amountType[]", new String[] { "limited" });
        addFormParameter(proxy, "amount[]", new String[] { "10" });

        proxy.execute();
        assertResultOK(proxy);

        EventEx modified = loadEventEx(DEFAULT_EVENT_ID);
        List<EventTicket> tickets = modified.getTickets();
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.