Examples of ActionProxy


Examples of in.partake.controller.ActionProxy

import in.partake.controller.ActionProxy;

public class RemoveOpenIDAPITest extends APIControllerTest {
    @Test
    public void testToRemoveOpenID() throws Exception {
        ActionProxy proxy = getActionProxy(POST, "/api/account/removeOpenID");

        loginAs(proxy, TestDataProvider.DEFAULT_USER_ID);
        addFormParameter(proxy, "identifier", TestDataProvider.DEFAULT_USER_OPENID_IDENTIFIER);
        addValidSessionTokenToParameter(proxy);

        proxy.execute();
        assertResultOK(proxy);

        // Check the OpenID has been really removed.
        List<UserOpenIDLink> links = loadOpenIDIdentifiers(DEFAULT_USER_ID);
        Assert.assertNotNull(links);
View Full Code Here

Examples of in.partake.controller.ActionProxy

import org.junit.Test;

public class StaticContactPageActionTest extends ActionControllerTest {
    @Test
    public void testToExecute() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/contact");
        loginAs(proxy, TestDataProvider.DEFAULT_USER_ID);

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

Examples of in.partake.controller.ActionProxy

        assertResultSuccess(proxy);
    }

    @Test
    public void testToExecuteWithoutLogin() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/contact");

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

Examples of in.partake.controller.ActionProxy

import in.partake.controller.ActionProxy;

public class ToppageActionTest extends ActionControllerTest {
    @Test
    public void testToExecute() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/");
        loginAs(proxy, TestDataProvider.DEFAULT_USER_ID);

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

Examples of in.partake.controller.ActionProxy

        assertResultSuccess(proxy);
    }

    @Test
    public void testToExecuteWithoutLogin() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/");

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

Examples of in.partake.controller.ActionProxy

import org.junit.Test;

public class StaticTermOfUsePageActionTest extends ActionControllerTest {
    @Test
    public void testToExecute() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/termofuse");
        loginAs(proxy, TestDataProvider.DEFAULT_USER_ID);

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

Examples of in.partake.controller.ActionProxy

        assertResultSuccess(proxy);
    }

    @Test
    public void testToExecuteWithoutLogin() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/termofuse");

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

Examples of in.partake.controller.ActionProxy

public class CategoryCalendarTest extends ActionControllerTest {

    @Test
    public void testWithValidCategory() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/calendars/category/" + EventCategory.getCategories().get(0).getKey());
        proxy.execute();

        assertThat(Helpers.contentType(proxy.getResult()), is("text/calendar"));
        assertThat(Helpers.charset(proxy.getResult()), is("utf-8"));
        assertThat(Helpers.header("Content-Disposition", proxy.getResult()), is("inline"));

        CalendarBuilder builder = new CalendarBuilder();
        Calendar calendar = builder.build(new ByteArrayInputStream(Helpers.contentAsBytes(proxy.getResult())));

        ComponentList list = calendar.getComponents(Component.VEVENT);
        List<String> uids = new ArrayList<String>();
        for (Object obj : list) {
            VEvent vEvent = (VEvent) obj;
View Full Code Here

Examples of in.partake.controller.ActionProxy

        assertThat(uids, not(hasItem(TestDataProvider.PRIVATE_EVENT_ID)));
    }

    @Test
    public void testWithInvalidCategory() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/calendars/category/invalidCateogry");
        proxy.execute();

        assertResultNotFound(proxy);
    }
View Full Code Here

Examples of in.partake.controller.ActionProxy

public class ShowCalendarTest extends ActionControllerTest {

    @Test
    public void testWithValidCalendarId() throws Exception {
        ActionProxy proxy = getActionProxy(GET, "/calendars/" + ENROLLED_USER_CALENDAR_ID);
        proxy.execute();

        assertThat(Helpers.contentType(proxy.getResult()), is("text/calendar"));
        assertThat(Helpers.charset(proxy.getResult()), is("utf-8"));
        assertThat(Helpers.header("Content-Disposition", proxy.getResult()), is("inline"));

        CalendarBuilder builder = new CalendarBuilder();
        Calendar calendar = builder.build(new ByteArrayInputStream(Helpers.contentAsBytes(proxy.getResult())));

        ComponentList list = calendar.getComponents(Component.VEVENT);
        List<String> uids = new ArrayList<String>();
        for (Object obj : list) {
            VEvent vEvent = (VEvent) obj;
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.