Package com.jcabi.github

Examples of com.jcabi.github.PullComment$Smart


     *
     * @throws Exception If a problem occurs.
     */
    @Test
    public void retrieveAsJson() throws Exception {
        final PullComment comment = MkPullCommentTest.comment();
        MatcherAssert.assertThat(
            comment.json().getString("url"),
            Matchers.startsWith("http://")
        );
    }
View Full Code Here


     * @throws Exception If a problem occurs.
     */
    @Test
    public void executePatchRequest() throws Exception {
        final String path = "/path/to/file.txt";
        final PullComment comment = MkPullCommentTest.comment();
        comment.patch(Json.createObjectBuilder().add("path", path).build());
        MatcherAssert.assertThat(
            comment.json().toString(),
            Matchers.containsString(path)
        );
    }
View Full Code Here

    )
        throws IOException {
        this.storage.lock();
        try {
            final JsonObject orig = this.get(comment).json();
            final PullComment reply = this.post(
                body,
                orig.getString("commit_id"),
                orig.getString("path"),
                comment
            );
            reply.patch(
                Json.createObjectBuilder()
                    .add("original_position", String.valueOf(comment)).build()
            );
            return reply;
        } finally {
View Full Code Here

     * @throws Exception If something goes wrong.
     */
    @Test
    public void fetchesPullComment() throws Exception {
        final PullComments comments = this.comments();
        final PullComment comment = comments.post("comment", "commit", "/", 1);
        MatcherAssert.assertThat(
            comments.get(comment.number()).number(),
            Matchers.equalTo(comment.number())
        );
    }
View Full Code Here

TOP

Related Classes of com.jcabi.github.PullComment$Smart

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.