Package com.jcabi.http.mock

Examples of com.jcabi.http.mock.MkGrizzlyContainer


     * RtReferences should be able to remove a Reference.
     * @throws Exception - If somethins goes wrong.
     */
    @Test
    public void removesReference() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_NO_CONTENT, "")
        ).start();
        final References refs = new RtReferences(
            new ApacheRequest(container.home()),
            repo()
View Full Code Here


     * RtReferences should be able to iterate over tags.
     * @throws Exception - If something goes wrong.
     */
    @Test
    public void iteratesTags() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(
                HttpURLConnection.HTTP_OK,
                "[{\"ref\":\"refs/tags/feature-b\"}]"
            )
        ).start();
View Full Code Here

     * RtReferences should be able to iterate over heads.
     * @throws Exception - If something goes wrong.
     */
    @Test
    public void iteratesHeads() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(
                HttpURLConnection.HTTP_OK,
                "[{\"ref\":\"refs/heads/feature-c\"}]"
            )
        ).start();
View Full Code Here

     *
     * @throws Exception If a problem occurs.
     */
    @Test
    public void retrieveEventAsJson() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(
                HttpURLConnection.HTTP_OK,
                "{\"test\":\"events\"}"
            )
        ).start();
View Full Code Here

    /**
     * Setting up the test fixture.
     */
    @Before
    public final void setUp() {
        this.container = new MkGrizzlyContainer();
    }
View Full Code Here

     *
     * @throws Exception when a problem occurs.
     */
    @Test
    public void fetchesCommits() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(
                HttpURLConnection.HTTP_OK,
                "[{\"commits\":\"test\"}]"
            )
        ).start();
View Full Code Here

     *
     * @throws Exception when a problem occurs.
     */
    @Test
    public void fetchesFiles() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(
                HttpURLConnection.HTTP_OK,
                "[{\"file1\":\"testFile\"}]"
            )
        ).start();
View Full Code Here

     *
     * @throws Exception when a problem occurs.
     */
    @Test
    public void executeMerge() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "testMerge")
        ).start();
        final RtPull pull = new RtPull(
            new ApacheRequest(container.home()),
            this.repo(),
View Full Code Here

     *
     * @throws Exception if a problem occurs.
     */
    @Test
    public void patchWithJson() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            new MkAnswer.Simple(HttpURLConnection.HTTP_OK, "response")
        ).start();
        final RtIssue issue = new RtIssue(
            new ApacheRequest(container.home()),
            this.repo(),
View Full Code Here

     *
     * @throws Exception if there is any problem
     */
    @Test
    public void jumpNextPage() throws Exception {
        final MkContainer container = new MkGrizzlyContainer().next(
            RtPaginationTest.simple("Hi Jeff")
                .withHeader("Link", "</s?page=3&per_page=100>; rel=\"next\"")
        ).next(RtPaginationTest.simple("Hi Mark")).start();
        final Request request = new ApacheRequest(container.home());
        final RtPagination<JsonObject> page = new RtPagination<JsonObject>(
View Full Code Here

TOP

Related Classes of com.jcabi.http.mock.MkGrizzlyContainer

Copyright © 2018 www.massapicom. 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.