use of com.meisolsson.githubsdk.model.Commit in project PocketHub by pockethub.
the class FullCommitTest method testSingleLineCommentSingleFile.
/**
* Test commit with one file and one line comment
*/
public void testSingleLineCommentSingleFile() {
GitHubFile file = GitHubFile.builder().filename("a.txt").build();
GitComment comment = GitComment.builder().path(file.filename()).position(10).build();
Commit commit = Commit.builder().files(Collections.singletonList(file)).build();
FullCommit full = new FullCommit(commit, new ArrayList<>(Collections.singletonList(comment)));
assertTrue(full.isEmpty());
assertEquals(1, full.getFiles().size());
assertEquals(comment, full.getFiles().get(0).get(10).get(0));
}
Aggregations