Examples of ApacheRequest


Examples of com.jcabi.http.request.ApacheRequest

    public void patchWithJson() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "response")
        ).start();
        final RtContent content = new RtContent(
            new ApacheRequest(container.home()),
            this.repo(),
            "path"
        );
        content.patch(
            Json.createObjectBuilder().add("patch", "test").build()
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

        final String raw = "the raw \u20ac";
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, raw)
        ).start();
        final InputStream stream = new RtContent(
            new ApacheRequest(container.home()),
            this.repo(),
            "raw"
        ).raw();
        try {
            MatcherAssert.assertThat(
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

            )
        );
        container.start();
        try {
            final UserEmails emails = new RtUserEmails(
                new ApacheRequest(container.home())
            );
            MatcherAssert.assertThat(
                emails.add(Collections.singletonList(email)).iterator().next(),
                Matchers.equalTo(email)
            );
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "{\"a\":\"b\"}")
                .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_HTML)
        ).start();
        final RtMarkdown markdown = new RtMarkdown(
            new MkGithub(),
            new ApacheRequest(container.home())
        );
        try {
            MatcherAssert.assertThat(
                markdown.render(
                    Json.createObjectBuilder().add("hello", "world").build()
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "Test Output")
                .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.TEXT_HTML)
        ).start();
        final RtMarkdown markdown = new RtMarkdown(
            new MkGithub(),
            new ApacheRequest(container.home())
        );
        try {
            MatcherAssert.assertThat(
                markdown.raw("Hello World!"),
                Matchers.equalTo("Test Output")
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

    public void deleteMilestone() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_NO_CONTENT, "")
        ).start();
        final RtMilestones milestones = new RtMilestones(
            new ApacheRequest(container.home()),
            repo()
        );
        milestones.remove(1);
        MatcherAssert.assertThat(
            container.take().method(),
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

        final String jessy = "Jessy";
        final MkContainer container = new MkGrizzlyContainer().next(
            RtValuePaginationTest.simple(jeff, mark)
                .withHeader("Link", "</s?page=3&per_page=100>; rel=\"next\"")
        ).next(RtValuePaginationTest.simple(judy, jessy)).start();
        final Request request = new ApacheRequest(container.home());
        final RtValuePagination<JsonObject, JsonArray> page =
            new RtValuePagination<JsonObject, JsonArray>(
                request,
                new RtValuePagination.Mapping<JsonObject, JsonArray>() {
                    @Override
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

        final String mark = "other Mark";
        final MkContainer container = new MkGrizzlyContainer().next(
            RtValuePaginationTest.simple(jeff, mark)
        ).start();
        try {
            final Request request = new ApacheRequest(container.home());
            final RtValuePagination<JsonObject, JsonArray> page =
                new RtValuePagination<JsonObject, JsonArray>(
                    request,
                    new RtValuePagination.Mapping<JsonObject, JsonArray>() {
                        @Override
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

                "{\"id\":\"1\"}"
            )
        ).start();
        final Gists gists = new RtGists(
            new MkGithub(),
            new ApacheRequest(container.home())
        );
        try {
            MatcherAssert.assertThat(
                gists.create(Collections.singletonMap("test", ""), false),
                Matchers.notNullValue()
View Full Code Here

Examples of com.jcabi.http.request.ApacheRequest

        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "testing")
        ).start();
        final Gists gists = new RtGists(
            new MkGithub(),
            new ApacheRequest(container.home())
        );
        try {
            MatcherAssert.assertThat(
                gists.get("gist"),
                Matchers.notNullValue()
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.