Package org.zanata.rest.client

Examples of org.zanata.rest.client.IProjectResource


        assertThat(response.getStatus(), is(Status.NOT_FOUND.getStatusCode()));
    }

    @Test
    public void createProjectWithInvalidData() {
        IProjectResource projectService =
                getClientRequestFactory().createProxy(IProjectResource.class,
                        createBaseURI(RESOURCE_PATH).resolve(PROJECT_SLUG));
        Project project1 =
                new Project(PROJECT_SLUG, PROJECT_NAME_INVALID,
                        ProjectType.Gettext.toString(), PROJECT_DESC);
        Response response1 = projectService.put(project1);

        assertThat(response1.getStatus(),
                is(Status.BAD_REQUEST.getStatusCode()));
    }
View Full Code Here


                        "sample-project",
                        "ProjectUpdateProjectUpdateProjectUpdateProjectUpdateProjectUpdateProjectUpdateProjectUpdate",
                        ProjectType.Gettext.toString(),
                        "Project Name exceeds 80");

        IProjectResource projectService =
                getClientRequestFactory().createProxy(IProjectResource.class,
                        createBaseURI(RESOURCE_PATH).resolve("sample-project"));

        Response response = projectService.put(project);

        assertThat(response.getStatus(), is(Status.BAD_REQUEST.getStatusCode()));
    }
View Full Code Here

    public void updateProject() {
        Project project =
                new Project("sample-project", "My Project Update",
                        ProjectType.Gettext.toString(), "Update project");

        IProjectResource projectService =
                getClientRequestFactory().createProxy(IProjectResource.class,
                        createBaseURI(RESOURCE_PATH).resolve("sample-project"));

        Response response = projectService.put(project);

        assertThat(response.getStatus(), is(Status.OK.getStatusCode()));

        ClientResponse<Project> projectResponse = projectService.get();

        assertThat(projectResponse.getStatus(), is(Status.OK.getStatusCode()));

        Project projectRes = projectResponse.getEntity();
View Full Code Here

TOP

Related Classes of org.zanata.rest.client.IProjectResource

Copyright © 2018 www.massapicom. 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.