use of com.meisolsson.githubsdk.model.GitHubEvent in project PocketHub by pockethub.
the class NewsEventTextTest method testPullRequest.
/**
* Verify text of pull request event
*/
@UiThreadTest
public void testPullRequest() {
PullRequestPayload payload = PullRequestPayload.builder().number(30).action(PullRequestPayload.Action.Closed).build();
GitHubEvent event = createEvent(GitHubEventType.PullRequestEvent, payload);
updateView(event);
verify("user closed pull request 30 on user/repo");
}
use of com.meisolsson.githubsdk.model.GitHubEvent in project PocketHub by pockethub.
the class NewsEventTextTest method testCommitCommentEvent.
/**
* Verify text of commit comment event
*/
@UiThreadTest
public void testCommitCommentEvent() {
GitHubEvent event = createEvent(GitHubEventType.CommitCommentEvent, CommitCommentPayload.builder().build());
updateView(event);
verify("user commented on user/repo");
}
use of com.meisolsson.githubsdk.model.GitHubEvent in project PocketHub by pockethub.
the class NewsEventTextTest method testDelete.
/**
* Verify text of delete event
*/
@UiThreadTest
public void testDelete() {
DeletePayload payload = DeletePayload.builder().refType(ReferenceType.Branch).ref("b1").build();
GitHubEvent event = createEvent(GitHubEventType.DeleteEvent, payload);
updateView(event);
verify("user deleted branch b1 at user/repo");
}
use of com.meisolsson.githubsdk.model.GitHubEvent in project PocketHub by pockethub.
the class NewsEventTextTest method testGist.
/**
* Verify text of Gist event
*/
@UiThreadTest
public void testGist() {
Gist gist = Gist.builder().id("1").build();
GistPayload payload = GistPayload.builder().action(GistPayload.Action.Created).gist(gist).build();
GitHubEvent event = createEvent(GitHubEventType.GistEvent, payload);
updateView(event);
verify("user created Gist 1");
}
use of com.meisolsson.githubsdk.model.GitHubEvent in project PocketHub by pockethub.
the class NewsEventTextTest method testFollow.
/**
* Verify text of follow event
*/
@UiThreadTest
public void testFollow() {
User target = User.builder().login("user2").build();
FollowPayload payload = FollowPayload.builder().target(target).build();
GitHubEvent event = createEvent(GitHubEventType.FollowEvent, payload);
updateView(event);
verify("user started following user2");
}
Aggregations