Package com.jcabi.http.mock

Examples of com.jcabi.http.mock.MkQuery.uri()


        );
        try {
            keys.remove(1);
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/user/keys/1")
            );
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
View Full Code Here


                keys.create("theTitle", "theKey").number(),
                Matchers.is(1)
            );
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/user/keys")
            );
            MatcherAssert.assertThat(
                query.body(),
                Matchers.equalTo(
View Full Code Here

            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(), Matchers.equalTo(Request.DELETE)
            );
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/repos/johnny/test/pulls/comments/2")
            );
        } finally {
            container.stop();
        }
View Full Code Here

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

            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

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

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

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

                    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

            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.PUT)
            );
            MatcherAssert.assertThat(
                query.uri().getPath(),
                Matchers.endsWith(path)
            );
            MatcherAssert.assertThat(
                query.body(),
                Matchers.equalTo(json.toString())
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.