Package com.jcabi.http.mock

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


        );
        MatcherAssert.assertThat(
            label.json().getString("msg"),
            Matchers.equalTo("hi")
        );
        container.stop();
    }

    /**
     * GhLabel can execute PATCH request.
     *
 
View Full Code Here


        );
        MatcherAssert.assertThat(
            container.take().method(),
            Matchers.equalTo(Request.PATCH)
        );
        container.stop();
    }

    /**
     * Create and return repo to test.
     * @return Repo
View Full Code Here

            MatcherAssert.assertThat(
                new Blob.Smart(blob).url(),
                Matchers.equalTo("http://localhost/1")
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtBlobs can get blob.
View Full Code Here

        MatcherAssert.assertThat(
            comment.json().getString(bodyString),
            Matchers.equalTo(patchedBody)
        );
        container.stop();
        gistContainer.stop();
    }

    /**
     * RtGistComment can remove comment.
     * @throws IOException if has some problems with json parsing.
View Full Code Here

        comment.remove();
        MatcherAssert.assertThat(
            container.take().method(),
            Matchers.equalTo(Request.DELETE)
        );
        container.stop();
    }
}
View Full Code Here

            MatcherAssert.assertThat(
                gist.read("hello"),
                Matchers.equalTo("success!")
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtGist should be able to do writes.
View Full Code Here

                Matchers.containsString(
                    "\"testFile\":{\"content\":\"testContent\"}"
                )
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtGist can fork itself.
View Full Code Here

            MatcherAssert.assertThat(
                forkedGist.read("hello"),
                Matchers.equalTo(content)
            );
        } finally {
            container.stop();
        }
    }

    /**
     * Gist.Smart can iterate through its files.
View Full Code Here

            MatcherAssert.assertThat(
                container.take().uri().toString(),
                Matchers.endsWith("/gists/testGetFiles")
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtGist can return a String representation correctly reflecting its URI.
View Full Code Here

            MatcherAssert.assertThat(
                gist.toString(),
                Matchers.endsWith("/gists/testToString")
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtGist can unstar a starred Gist.
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.