Examples of MkQuery


Examples of com.jcabi.http.mock.MkQuery

            new ApacheRequest(container.home()),
            Mockito.mock(User.class)
        );
        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)
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

            );
            MatcherAssert.assertThat(
                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(
                    "{\"title\":\"theTitle\",\"key\":\"theKey\"}"
                )
            );
        } finally {
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

            new MkGithub(),
            new ApacheRequest(container.home()),
            "unstar"
        );
        gist.unstar();
        final MkQuery query = container.take();
        MatcherAssert.assertThat(
            query.method(),
            Matchers.equalTo(Request.DELETE)
        );
        MatcherAssert.assertThat(
            query.body(),
            Matchers.isEmptyOrNullString()
        );
        container.stop();
    }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

        Mockito.doReturn(repo()).when(pull).repo();
        final RtPullComments comments =
            new RtPullComments(new ApacheRequest(container.home()), pull);
        try {
            comments.remove(2);
            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

Examples of com.jcabi.http.mock.MkQuery

            "path"
        );
        content.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

        final RtLabels issues = new RtLabels(
            new JdkRequest(container.home()),
            repo()
        );
        issues.delete("issue");
        final MkQuery query = container.take();
        MatcherAssert.assertThat(
            query.method(),
            Matchers.equalTo(Request.DELETE)
        );
        MatcherAssert.assertThat(
            query.body(),
            Matchers.isEmptyOrNullString()
        );
        container.stop();
    }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

            new MkGithub(),
            new ApacheRequest(container.home())
        );
        try {
            gists.remove("12234");
            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

            Mockito.mock(Github.class),
            new ApacheRequest(container.home())
        );
        repos.remove(new Coordinates.Simple("", ""));
        try {
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
            );
            MatcherAssert.assertThat(
                query.body(),
                Matchers.isEmptyString()
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

            new JdkRequest(container.home()),
            RtHooksTest.repo()
        );
        hooks.remove(1);
        try {
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
            );
            MatcherAssert.assertThat(
                query.body(),
                Matchers.isEmptyString()
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery

        final RtRelease release = RtReleaseTest.release(this.container.home());
        final JsonObject json = Json.createObjectBuilder()
            .add("tag_name", "v1.0.0")
            .build();
        release.patch(json);
        final MkQuery query = this.container.take();
        MatcherAssert.assertThat(
            query.method(),
            Matchers.equalTo(Request.PATCH)
        );
        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.