Examples of ApacheRequest


Examples of com.jcabi.http.request.ApacheRequest

            )
        ).next(new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "success!"))
            .start();
        final RtGist gist = new RtGist(
            new MkGithub(),
            new ApacheRequest(container.home()),
            "test"
        );
        try {
            MatcherAssert.assertThat(
                gist.read("hello"),
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "testFileWrite")
        ).start();
        final RtGist gist = new RtGist(
            new MkGithub(),
            new ApacheRequest(container.home()),
            "testWrite"
        );
        gist.write("testFile", "testContent");
        try {
            MatcherAssert.assertThat(
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, fileContent)
        );
        container.start();
        final Gist gist = new RtGist(
            new MkGithub(),
            new ApacheRequest(container.home()),
            "test"
        );
        final String content = gist.read("hello");
        final Gist forkedGist = gist.fork();
        try {
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

            )
        ).start();
        final Gist.Smart smart = new Gist.Smart(
            new RtGist(
                new MkGithub(),
                new ApacheRequest(container.home()),
                "testGetFiles"
            )
        );
        try {
            MatcherAssert.assertThat(
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

    @Test
    public void canRepresentAsString() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().start();
        final RtGist gist = new RtGist(
            new MkGithub(),
            new ApacheRequest(container.home()),
            "testToString"
        );
        try {
            MatcherAssert.assertThat(
                gist.toString(),
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_NO_CONTENT, "")
        ).start();
        final RtGist gist = new RtGist(
            new MkGithub(),
            new ApacheRequest(container.home()),
            "unstar"
        );
        gist.unstar();
        final MkQuery query = container.take();
        MatcherAssert.assertThat(
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "{\"msg\":\"hi\"}")
        ).start();
        try {
            final RtGist gist = new RtGist(
                new MkGithub(),
                new ApacheRequest(container.home()),
                "patch"
            );
            gist.patch(
                Json.createObjectBuilder()
                    .add("content", "hi you!")
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

        ).next(new MkAnswer.Simple(HttpURLConnection.HTTP_OK, response))
            .start();
        final Pull pull = Mockito.mock(Pull.class);
        Mockito.doReturn(repo()).when(pull).repo();
        final RtPullComments pullComments = new RtPullComments(
            new ApacheRequest(container.home()),
                pull
        );
        try {
            final PullComment pullComment = pullComments.post(
                body, commit, path, position
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

        ).next(new MkAnswer.Simple(HttpURLConnection.HTTP_OK, response))
            .start();
        final Pull pull = Mockito.mock(Pull.class);
        Mockito.doReturn(repo()).when(pull).repo();
        final RtPullComments pullComments = new RtPullComments(
            new ApacheRequest(container.home()),
                pull
        );
        try {
            final PullComment pullComment = pullComments.reply(
                body, number
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

            new MkAnswer.Simple(HttpURLConnection.HTTP_NO_CONTENT, "")
        ).start();
        final Pull pull = Mockito.mock(Pull.class);
        Mockito.doReturn(repo()).when(pull).repo();
        final RtPullComments comments =
            new RtPullComments(new ApacheRequest(container.home()), pull);
        try {
            comments.remove(2);
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(), Matchers.equalTo(Request.DELETE)
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.