Package com.jcabi.http.mock

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


            MatcherAssert.assertThat(
                refs.create("abceefgh3456", "refs/heads/feature-a"),
                Matchers.instanceOf(Reference.class)
            );
            MatcherAssert.assertThat(
                container.take().method(),
                Matchers.equalTo(Request.POST)
            );
        } finally {
            container.stop();
        }
View Full Code Here


            repo()
        );
        refs.remove("heads/feature-a");
        try {
            MatcherAssert.assertThat(
                container.take().method(),
                Matchers.equalTo(Request.DELETE)
            );
        } finally {
            container.stop();
        }
View Full Code Here

            MatcherAssert.assertThat(
                refs.tags(),
                Matchers.<Reference>iterableWithSize(1)
            );
            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith("/git/refs/tags")
            );
        } finally {
            container.stop();
        }
View Full Code Here

            MatcherAssert.assertThat(
                refs.heads(),
                Matchers.<Reference>iterableWithSize(1)
            );
            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith("/git/refs/heads")
            );
        } finally {
            container.stop();
        }
View Full Code Here

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

            1
        );
        issue.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 JdkRequest(container.home()),
            repo()
        );
        final Release release = releases.create(tag);
        MatcherAssert.assertThat(
            container.take().method(),
            Matchers.equalTo(Request.POST)
        );
        MatcherAssert.assertThat(
            release.json().getString("tag_name"),
            Matchers.equalTo(tag)
View Full Code Here

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

            new ApacheRequest(container.home()),
            repo()
        );
        final Pull pull = pulls.create(title, "octocat", "master");
        MatcherAssert.assertThat(
            container.take().method(),
            Matchers.equalTo(Request.POST)
        );
        MatcherAssert.assertThat(
            new Pull.Smart(pull).title(),
            Matchers.equalTo(title)
View Full Code Here

        );
        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(),
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.