Package org.zanata.rest

Examples of org.zanata.rest.ResourceRequest


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

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


    }

    @Test
    @RunAsClient
    public void getIterationStatisticsXml() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/stats/proj/sample-project/iter/1.0"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_XML);
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getIterationStatisticsXmlWithDetails() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/stats/proj/sample-project/iter/1.0"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_XML);
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getDocumentStatisticsXml() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/stats/proj/sample-project/iter/1.0/doc/my/path/document.txt"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_XML);
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getDocumentStatisticsXmlWithDetails() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/stats/proj/sample-project/iter/1.0/doc/my/path/document.txt"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_XML);
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getIterationStatisticsJson() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/stats/proj/sample-project/iter/1.0"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON);
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getIterationStatisticsJsonWithDetails() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/stats/proj/sample-project/iter/1.0"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON);
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getDocumentStatisticsJson() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/stats/proj/sample-project/iter/1.0/doc/my/path/document.txt"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON);
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getDocumentStatisticsJsonWithDetails() throws Exception {
        new ResourceRequest(
                getRestEndpointUrl("/stats/proj/sample-project/iter/1.0/doc/my/path/document.txt"),
                "GET") {
            @Override
            protected void prepareRequest(ClientRequest request) {
                request.header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON);
View Full Code Here

    }

    @Test
    @RunAsClient
    public void getJsonProjectIteration() 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

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.