Package com.jcabi.http.mock

Examples of com.jcabi.http.mock.MkContainer.take()


            MatcherAssert.assertThat(
                hook.json(),
                Matchers.notNullValue()
            );
            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith("/repos/test/repo/hooks/1")
            );
        } finally {
            container.stop();
        }
View Full Code Here


            );
            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\"")
View Full Code Here

                .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(
View Full Code Here

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

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

            "testPatch"
        );
        org.patch(
            Json.createObjectBuilder().add("patch", "test").build()
        );
        final MkQuery query = container.take();
        try {
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.PATCH)
            );
View Full Code Here

            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

            MatcherAssert.assertThat(
                json.getString("body"),
                Matchers.is("test")
            );
            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith("/repos/joe/test/pulls/comments/1")
            );
        } finally {
            container.stop();
        }
View Full Code Here

            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(),
View Full Code Here

            MatcherAssert.assertThat(
                trees.get(tri.sha()),
                Matchers.equalTo(tri)
            );
            MatcherAssert.assertThat(
                container.take().method(),
                Matchers.equalTo(Request.POST)
            );
        } 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.