Examples of MkQuery


Examples of com.jcabi.http.mock.MkQuery

            this.repo(),
            3
        );
        pull.merge("Test commit.");
        try {
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.PUT)
            );
            MatcherAssert.assertThat(
                query.body(),
                Matchers.equalTo("{\"commit_message\":\"Test commit.\"}")
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

            1
        );
        issue.patch(
            Json.createObjectBuilder().add("patch", "test").build()
        );
        final MkQuery query = container.take();
        try {
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.PATCH)
            );
            MatcherAssert.assertThat(
                query.body(),
                Matchers.equalTo("{\"patch\":\"test\"}")
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

            new ApacheRequest(container.home()),
            RtReleasesTest.repo()
        );
        try {
            releases.remove(1);
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/releases/1")
            );
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

        );
        try {
            final JsonObject json = Json.createObjectBuilder()
                .add("name", "hello").build();
            asset.patch(json);
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(), Matchers.equalTo(Request.PATCH)
            );
            MatcherAssert.assertThat(
                query.body(),
                Matchers.containsString("{\"name\":\"hello\"}")
            );
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/repos/john/test/releases/assets/2")
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

            release(),
            3
        );
        try {
            asset.remove();
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

            release(),
            4
        );
        try {
            final InputStream stream = asset.raw();
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(), Matchers.equalTo(Request.GET)
            );
            MatcherAssert.assertThat(
                IOUtils.toString(stream),
                Matchers.notNullValue()
            );
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

        final RtComment comment = new RtComment(
            new ApacheRequest(container.home()), issue, 10
        );
        try {
            comment.remove();
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

        );
        final JsonObject jsonPatch = Json.createObjectBuilder()
            .add("title", "test comment").build();
        try {
            comment.patch(jsonPatch);
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(), Matchers.equalTo(Request.PATCH)
            );
        } finally {
            container.stop();
        }
    }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

        try {
            MatcherAssert.assertThat(
                contents.readme().path(),
                Matchers.is(path)
            );
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/repos/test/contents/readme")
            );
            MatcherAssert.assertThat(
                query.body().length(),
                Matchers.is(0)
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

        try {
            MatcherAssert.assertThat(
                contents.readme("test-branch").path(),
                Matchers.is(path)
            );
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/repos/test/contents/readme")
            );
            MatcherAssert.assertThat(
                query.body(),
                Matchers.is("{\"ref\":\"test-branch\"}")
            );
        } finally {
            container.stop();
        }
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.