Package org.zanata.rest

Examples of org.zanata.rest.ResourceRequest


    }

    @Test
    @RunAsClient
    public void getVersionJson() throws Exception {
        new ResourceRequest(getRestEndpointUrl("/version"), "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.accept("application/vnd.zanata.Version+json");
            }
View Full Code Here


    }

    @Test
    @RunAsClient
    public void getPo() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/file/translation/sample-project/1.0/en-US/po"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.queryParameter("docId", "my/path/document.txt");
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getPo2() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/file/translation/sample-project/1.0/en-US/po"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.queryParameter("docId", "my/path/document-2.txt");
View Full Code Here

    }

    @Test
    @RunAsClient
    public void head() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/projects/p/sample-project/iterations/i/1.0"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
            }
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getXml() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/projects/p/sample-project/iterations/i/1.0"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT,
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getJson() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/projects/p/sample-project/iterations/i/1.0"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT,
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getCurrentIterationOnObsoleteProject() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/projects/p/obsolete-project/iterations/i/obsolete-current"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT,
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getCurrentIterationOnRetiredProject() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/projects/p/retired-project/iterations/i/retired-current"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT,
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getObsoleteIterationOnCurrentProject() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/projects/p/current-project/iterations/i/current-obsolete"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT,
View Full Code Here

    public void putXml() throws Exception {
        final ProjectIteration iteration =
                new ProjectIteration("test-iteration");
        iteration.setStatus(EntityStatus.ACTIVE);

        new ResourceRequest(
                getRestEndpointUrl("/projects/p/sample-project/iterations/i/test-iteration"),
                "PUT", getAuthorizedEnvironment()) {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.body(
View Full Code Here

TOP

Related Classes of org.zanata.rest.ResourceRequest

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.