Examples of MkQuery


Examples of com.jcabi.http.mock.MkQuery

        );
        try {
            final Content.Smart smart = new Content.Smart(
                contents.get(path, "branch1")
            );
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith(
                    "/repos/test/contents/contents/test/file?ref=branch1"
                )
            );
            MatcherAssert.assertThat(
                smart.path(),
                Matchers.is(path)
            );
            MatcherAssert.assertThat(
                smart.name(),
                Matchers.is(name)
            );
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.GET)
            );
            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith(
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

            );
            MatcherAssert.assertThat(
                commit.sha(),
                Matchers.is("commitSha")
            );
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.body(),
                Matchers.allOf(
                    Matchers.containsString("\"message\":\"Delete me\""),
                    Matchers.containsString("\"sha\":\"fileSha\"")
                )
            );
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/repos/test/contents/contents/to/remove")
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

                .build();
            MatcherAssert.assertThat(
                new RepoCommit.Smart(contents.update(path, json)).sha(),
                Matchers.is(sha)
            );
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.PUT)
            );
            MatcherAssert.assertThat(
                query.uri().getPath(),
                Matchers.endsWith(path)
            );
            MatcherAssert.assertThat(
                query.body(),
                Matchers.equalTo(json.toString())
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

            new JdkRequest(container.home()),
            this.repo()
        );
        try {
            users.add("dummy1");
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.PUT)
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

            new JdkRequest(container.home()),
            this.repo()
        );
        try {
            users.remove("dummy");
            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

            "testPatch"
        );
        org.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()),
            3,
            RtDeployKeyTest.repo()
        );
        key.remove();
        final MkQuery query = container.take();
        MatcherAssert.assertThat(
            query.method(),
            Matchers.equalTo(Request.DELETE)
        );
        container.stop();
    }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

            new RtPullComment(new ApacheRequest(container.home()), pull, 2);
        try {
            final JsonObject json = Json.createObjectBuilder()
                .add("body", "test comment").build();
            comment.patch(json);
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(), Matchers.equalTo(Request.PATCH)
            );
            MatcherAssert.assertThat(
                query.body(),
                Matchers.containsString("{\"body\":\"test comment\"}")
            );
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/repos/joe/test/pulls/comments/2")
            );
        } 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.