Package in.partake.controller

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


        loginAs(proxy, EVENT_OWNER_ID);
        addValidSessionTokenToParameter(proxy);
        addFormParameter(proxy, "eventId", DEFAULT_EVENT_ID);
        addFormParameter(proxy, "category", "invalidCategory");

        proxy.execute();
        assertResultInvalid(proxy, UserErrorCode.INVALID_PARAMETERS, "category");
    }

    // --- begindate
View Full Code Here


        loginAs(proxy, EVENT_OWNER_ID);
        addValidSessionTokenToParameter(proxy);
        addFormParameter(proxy, "eventId", DEFAULT_EVENT_ID);
        addFormParameter(proxy, "beginDate", "2012-08-01 00:00");

        proxy.execute();
        assertResultOK(proxy);

        Event modified = loadEvent(DEFAULT_EVENT_ID);
        assertThat(modified.getBeginDate(), is(TimeUtil.create(2012, 8, 1, 0, 0, 0)));
    }
View Full Code Here

        loginAs(proxy, EVENT_OWNER_ID);
        addValidSessionTokenToParameter(proxy);
        addFormParameter(proxy, "eventId", DEFAULT_EVENT_ID);
        addFormParameter(proxy, "beginDate", String.valueOf(dt.getTime()));

        proxy.execute();
        assertResultOK(proxy);

        Event modified = loadEvent(DEFAULT_EVENT_ID);
        assertThat(modified.getBeginDate(), is(dt));
    }
View Full Code Here

    @Test
    public void testToGetWithLogin() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/api/account/get");
        loginAs(proxy, TestDataProvider.DEFAULT_USER_ID);

        proxy.execute();
        assertResultOK(proxy);

        // Check JSON

        ObjectNode obj = getJSON(proxy);
View Full Code Here

        loginAs(proxy, EVENT_OWNER_ID);
        addValidSessionTokenToParameter(proxy);
        addFormParameter(proxy, "eventId", DEFAULT_EVENT_ID);
        addFormParameter(proxy, "beginDate", "invalid");

        proxy.execute();
        assertResultInvalid(proxy, UserErrorCode.INVALID_PARAMETERS, "beginDate");
    }

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

    @Test
    public void testToGetWithoutLogin() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/api/account/get");

        proxy.execute();
        assertResultLoginRequired(proxy);
    }
}
View Full Code Here

        loginAs(proxy, EVENT_OWNER_ID);
        addValidSessionTokenToParameter(proxy);
        addFormParameter(proxy, "eventId", DEFAULT_EVENT_ID);
        addFormParameter(proxy, "beginDate", "");

        proxy.execute();
        assertResultInvalid(proxy, UserErrorCode.INVALID_PARAMETERS, "beginDate");
    }

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

        loginAs(proxy, EVENT_OWNER_ID);
        addValidSessionTokenToParameter(proxy);
        addFormParameter(proxy, "eventId", DEFAULT_EVENT_ID);
        addFormParameter(proxy, "beginDate", "1970-01-01 09:00");

        proxy.execute();
        assertResultInvalid(proxy, UserErrorCode.INVALID_PARAMETERS, "beginDate");
    }

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

        loginAs(proxy, EVENT_OWNER_ID);
        addValidSessionTokenToParameter(proxy);
        addFormParameter(proxy, "eventId", DEFAULT_EVENT_ID);
        addFormParameter(proxy, "beginDate", "1900-01-01 09:00");

        proxy.execute();
        assertResultInvalid(proxy, UserErrorCode.INVALID_PARAMETERS, "beginDate");
    }

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

        loginAs(proxy, EVENT_OWNER_ID);
        addValidSessionTokenToParameter(proxy);
        addFormParameter(proxy, "eventId", DEFAULT_EVENT_ID);
        addFormParameter(proxy, "beginDate", "2200-01-01 09:00");

        proxy.execute();
        assertResultInvalid(proxy, UserErrorCode.INVALID_PARAMETERS, "beginDate");
    }

    // --- enddata
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.