Package com.jcabi.http.mock

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


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


            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/releases/1")
            );
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
            );
        } finally {
            container.stop();
        }
View Full Code Here

            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(),
                Matchers.containsString("{\"name\":\"hello\"}")
            );
View Full Code Here

        );
        try {
            asset.remove();
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
            );
        } finally {
            container.stop();
        }
View Full Code Here

        );
        try {
            final InputStream stream = asset.raw();
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(), Matchers.equalTo(Request.GET)
            );
            MatcherAssert.assertThat(
                IOUtils.toString(stream),
                Matchers.notNullValue()
            );
View Full Code Here

        );
        try {
            comment.remove();
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
            );
        } finally {
            container.stop();
        }
View Full Code Here

            .add("title", "test comment").build();
        try {
            comment.patch(jsonPatch);
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(), Matchers.equalTo(Request.PATCH)
            );
        } finally {
            container.stop();
        }
    }
View Full Code Here

            MatcherAssert.assertThat(
                smart.name(),
                Matchers.is(name)
            );
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.GET)
            );
            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith(
View Full Code Here

                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(
                query.uri().getPath(),
                Matchers.endsWith(path)
View Full Code Here

        );
        try {
            users.add("dummy1");
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.PUT)
            );
        } 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.