* @throws Exception If some problem inside
*/
@Test
public void worksWithMockedData() throws Exception {
final Repo repo = new MkGithub().repos().create(MkGithubTest.json());
final Issue issue = repo.issues().create("hey", "how are you?");
final Comment comment = issue.comments().post("hey, works?");
MatcherAssert.assertThat(
new Comment.Smart(comment).body(),
Matchers.startsWith("hey, ")
);
MatcherAssert.assertThat(
repo.issues().get(issue.number()).comments().iterate(),
Matchers.<Comment>iterableWithSize(1)
);
MatcherAssert.assertThat(
new User.Smart(new Comment.Smart(comment).author()).login(),
Matchers.equalTo(