use of com.meisolsson.githubsdk.model.GitHubEvent in project PocketHub by pockethub.
the class NewsEventTextTest method testCreateBranchEvent.
/**
* Verify text of create event
*/
@UiThreadTest
public void testCreateBranchEvent() {
CreatePayload payload = CreatePayload.builder().refType(ReferenceType.Branch).ref("b1").build();
GitHubEvent event = createEvent(GitHubEventType.CreateEvent, payload);
updateView(event);
verify("user created branch b1 at user/repo");
}
use of com.meisolsson.githubsdk.model.GitHubEvent in project PocketHub by pockethub.
the class NewsEventTextTest method testAddMember.
/**
* Verify text of member event
*/
@UiThreadTest
public void testAddMember() {
User user = User.builder().login("person").build();
MemberPayload payload = MemberPayload.builder().member(user).build();
GitHubEvent event = createEvent(GitHubEventType.MemberEvent, payload);
updateView(event);
verify("user added person as a collaborator to user/repo");
}
use of com.meisolsson.githubsdk.model.GitHubEvent in project PocketHub by pockethub.
the class NewsEventTextTest method testIssueComment.
/**
* Verify text of issue comment event
*/
@UiThreadTest
public void testIssueComment() {
Issue issue = Issue.builder().number(5).build();
IssueCommentPayload payload = IssueCommentPayload.builder().issue(issue).build();
GitHubEvent event = createEvent(GitHubEventType.IssueCommentEvent, payload);
updateView(event);
verify("user commented on issue 5 on user/repo");
}
use of com.meisolsson.githubsdk.model.GitHubEvent in project PocketHub by pockethub.
the class NewsEventTextTest method testWiki.
/**
* Verify text of wiki event
*/
@UiThreadTest
public void testWiki() {
GitHubEvent event = createEvent(GitHubEventType.GollumEvent, null);
updateView(event);
verify("user updated the wiki in user/repo");
}
use of com.meisolsson.githubsdk.model.GitHubEvent in project PocketHub by pockethub.
the class NewsEventTextTest method testIssue.
/**
* Verify text of issue event
*/
@UiThreadTest
public void testIssue() {
Issue issue = Issue.builder().number(8).build();
IssuesPayload payload = IssuesPayload.builder().action(IssuesPayload.Action.Closed).issue(issue).build();
GitHubEvent event = createEvent(GitHubEventType.IssuesEvent, payload);
updateView(event);
verify("user closed issue 8 on user/repo");
}
Aggregations