Package com.jcabi.http.mock

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


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


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

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

            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.GET)
            );
            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith(
                    "/repos/test/contents/contents/test/file?ref=branch1"
                )
            );
        } finally {
View Full Code Here

        try {
            final Content.Smart smart = new Content.Smart(
                contents.create(content)
            );
            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith(path)
            );
            MatcherAssert.assertThat(
                smart.path(),
                Matchers.is(path)
View Full Code Here

            MatcherAssert.assertThat(
                smart.name(),
                Matchers.is(name)
            );
            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith("/repos/test/contents/contents/test/thefile")
            );
        } finally {
            container.stop();
        }
View Full Code Here

            reference.patch(
                Json.createObjectBuilder().add("sha", "abcdef12345")
                .add("force", "false").build()
            );
            MatcherAssert.assertThat(
                container.take().method(),
                Matchers.equalTo(Request.PATCH)
            );
        } 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.