Package org.zanata.apicompat.rest.client

Examples of org.zanata.apicompat.rest.client.IProjectIterationResource


            }

        }.run();

        // Retreive it again
        IProjectIterationResource iterationClient =
                super.createProxy(
                        createClientProxyFactory(TRANSLATOR, TRANSLATOR_KEY),
                        IProjectIterationResource.class,
                        "/projects/p/sample-project/iterations/i/"
                                + newIteration.getId());

        ClientResponse<ProjectIteration> getResponse = iterationClient.get();

        assertThat(getResponse.getStatus(), is(Status.OK.getStatusCode())); // 200

        ProjectIteration it = getResponse.getEntity();
        assertThat(it.getId(), is("new-iteration"));
View Full Code Here


    }

    @Test
    @RunAsClient
    public void getXmlProjectIteration() throws Exception {
        IProjectIterationResource iterationClient =
                super.createProxy(
                        createClientProxyFactory(TRANSLATOR, TRANSLATOR_KEY),
                        IProjectIterationResource.class,
                        "/projects/p/sample-project/iterations/i/1.0");
        ClientResponse<ProjectIteration> response = iterationClient.get();

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

        ProjectIteration it = response.getEntity();
        assertThat(it.getId(), is("1.0"));
View Full Code Here

    @Test
    @RunAsClient
    public void putXmlProjectIteration() throws Exception {
        ProjectIteration newIteration = new ProjectIteration("new-iteration");

        IProjectIterationResource iterationClient =
                super.createProxy(createClientProxyFactory(ADMIN, ADMIN_KEY),
                        IProjectIterationResource.class,
                        "/projects/p/sample-project/iterations/i/"
                                + newIteration.getId());
        ClientResponse response = iterationClient.put(newIteration);

        assertThat(response.getStatus(), is(Status.CREATED.getStatusCode())); // 201
        response.releaseConnection();

        // Retreive it again
        ClientResponse<ProjectIteration> getResponse = iterationClient.get();

        assertThat(getResponse.getStatus(), is(Status.OK.getStatusCode())); // 200

        ProjectIteration it = getResponse.getEntity();
        assertThat(it.getId(), is("new-iteration"));
View Full Code Here

TOP

Related Classes of org.zanata.apicompat.rest.client.IProjectIterationResource

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.