Package com.jcabi.http.mock

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


            MatcherAssert.assertThat(
                comments.iterate(Collections.<String, String>emptyMap()),
                Matchers.<PullComment>iterableWithSize(2)
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtPullComments can fetch pull comments for a pull request.
View Full Code Here


            MatcherAssert.assertThat(
                comments.iterate(1, Collections.<String, String>emptyMap()),
                Matchers.<PullComment>iterableWithSize(2)
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtPullComments can post a new a pull comment.
View Full Code Here

            MatcherAssert.assertThat(
                new PullComment.Smart(pullComment).commitId(),
                Matchers.equalTo(commit)
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtPullComments can reply to an existing pull comment.
View Full Code Here

            MatcherAssert.assertThat(
                new PullComment.Smart(pullComment).reply(),
                Matchers.equalTo(number)
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtPullComments can remove a pull comment.
View Full Code Here

            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/repos/johnny/test/pulls/comments/2")
            );
        } finally {
            container.stop();
        }
    }

    /**
     * This method returns a Repo for testing.
View Full Code Here

            MatcherAssert.assertThat(
                query.body(),
                Matchers.equalTo("{\"patch\":\"test\"}")
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtContent should be able to compare different instances.
View Full Code Here

                container.take().headers().get(HttpHeaders.ACCEPT).get(0),
                Matchers.is("application/vnd.github.v3.raw")
            );
        } finally {
            stream.close();
            container.stop();
        }
    }

    /**
     * Mock repo for GhIssue creation.
View Full Code Here

            MatcherAssert.assertThat(
                emails.add(Collections.singletonList(email)).iterator().next(),
                Matchers.equalTo(email)
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtUserEmails can remove emails.
View Full Code Here

            MatcherAssert.assertThat(
                container.take().body(),
                Matchers.equalTo("{\"hello\":\"world\"}")
            );
        } finally {
            container.stop();
        }
    }

    /**
     * RtMarkdown should be able to return raw output.
View Full Code Here

            MatcherAssert.assertThat(
                container.take().body(),
                Matchers.equalTo("Hello World!")
            );
        } 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.