Examples of home()


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

    public void sendHttpRequestAndWriteResponseAsJson() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "{\"msg\": \"hi\"}")
        ).start();
        final RtLabel label = new RtLabel(
            new ApacheRequest(container.home()),
            RtLabelTest.repo(),
            "bug"
        );
        MatcherAssert.assertThat(
            label.json().getString("msg"),
View Full Code Here

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

    public void executePatchRequest() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "{\"msg\":\"hi\"}")
        ).start();
        final RtLabel label = new RtLabel(
            new ApacheRequest(container.home()),
            RtLabelTest.repo(),
            "enhance"
        );
        label.patch(
            Json.createObjectBuilder()
View Full Code Here

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

        final String body = blob().toString();
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_CREATED, body)
        ).next(new MkAnswer.Simple(HttpURLConnection.HTTP_OK, body)).start();
        final RtBlobs blobs = new RtBlobs(
            new ApacheRequest(container.home()),
            repo()
        );
        try {
            final Blob blob = blobs.create(content, "utf-8");
            MatcherAssert.assertThat(
View Full Code Here

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

                .start();
        final MkContainer gistContainer = new MkGrizzlyContainer().start();
        final RtGist gist =
            new RtGist(
                new MkGithub(),
                new ApacheRequest(gistContainer.home()), "someName"
            );
        final RtGistComment comment = new RtGistComment(
            new ApacheRequest(container.home()), gist, identifier
        );
        comment.patch(Json.createObjectBuilder()
View Full Code Here

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

            new MkGithub(),
            new FakeRequest().withStatus(HttpURLConnection.HTTP_NO_CONTENT),
            "gistName"
        );
        final RtGistComment comment = new RtGistComment(
            new ApacheRequest(container.home()), gist, identifier
        );
        comment.remove();
        MatcherAssert.assertThat(
            container.take().method(),
            Matchers.equalTo(Request.DELETE)
View Full Code Here

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

            )
        ).next(new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "success!"))
            .start();
        final RtGist gist = new RtGist(
            new MkGithub(),
            new ApacheRequest(container.home()),
            "test"
        );
        try {
            MatcherAssert.assertThat(
                gist.read("hello"),
View Full Code Here

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

        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "testFileWrite")
        ).start();
        final RtGist gist = new RtGist(
            new MkGithub(),
            new ApacheRequest(container.home()),
            "testWrite"
        );
        gist.write("testFile", "testContent");
        try {
            MatcherAssert.assertThat(
View Full Code Here

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

            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, fileContent)
        );
        container.start();
        final Gist gist = new RtGist(
            new MkGithub(),
            new ApacheRequest(container.home()),
            "test"
        );
        final String content = gist.read("hello");
        final Gist forkedGist = gist.fork();
        try {
View Full Code Here

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

            )
        ).start();
        final Gist.Smart smart = new Gist.Smart(
            new RtGist(
                new MkGithub(),
                new ApacheRequest(container.home()),
                "testGetFiles"
            )
        );
        try {
            MatcherAssert.assertThat(
View Full Code Here

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

    @Test
    public void canRepresentAsString() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().start();
        final RtGist gist = new RtGist(
            new MkGithub(),
            new ApacheRequest(container.home()),
            "testToString"
        );
        try {
            MatcherAssert.assertThat(
                gist.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.