Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Ander Peñalba2015-09-19 13:13:16 -0400
committerMatthias Sohn2015-09-24 16:49:47 -0400
commitd6d0679b5685f50c3c3634fa123c46fdced40698 (patch)
tree67de8c8b0ce0f451f1bb0700c57f38e6085d9831 /org.eclipse.egit.github.core.tests
parent9e5e4567cbb9497e7f2ee56cc6f45e7452eb032f (diff)
downloadegit-github-d6d0679b5685f50c3c3634fa123c46fdced40698.tar.gz
egit-github-d6d0679b5685f50c3c3634fa123c46fdced40698.tar.xz
egit-github-d6d0679b5685f50c3c3634fa123c46fdced40698.zip
Add 'action' and 'pullRequest' to PullRequestReviewCommentPayload
API specification: https://developer.github.com/v3/activity/events/types/#pullrequestreviewcommentevent Change-Id: I5277fdbb6cb7fc1690341501f408ca4e5d1ee4f5 Signed-off-by: Jon Ander Peñalba <jonan88@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.github.core.tests')
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PullRequestReviewCommentPayloadTest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PullRequestReviewCommentPayloadTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PullRequestReviewCommentPayloadTest.java
index 1ccd514a..d7f9526c 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PullRequestReviewCommentPayloadTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PullRequestReviewCommentPayloadTest.java
@@ -14,6 +14,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import org.eclipse.egit.github.core.CommitComment;
+import org.eclipse.egit.github.core.PullRequest;
import org.eclipse.egit.github.core.event.PullRequestReviewCommentPayload;
import org.junit.Test;
@@ -28,7 +29,9 @@ public class PullRequestReviewCommentPayloadTest {
@Test
public void defaultState() {
PullRequestReviewCommentPayload payload = new PullRequestReviewCommentPayload();
+ assertNull(payload.getAction());
assertNull(payload.getComment());
+ assertNull(payload.getPullRequest());
}
/**
@@ -38,6 +41,9 @@ public class PullRequestReviewCommentPayloadTest {
public void updateFields() {
PullRequestReviewCommentPayload payload = new PullRequestReviewCommentPayload();
CommitComment comment = new CommitComment();
+ PullRequest pullRequest = new PullRequest().setTitle("pull");
+ assertEquals("created", payload.setAction("created").getAction());
+ assertEquals(pullRequest, payload.setPullRequest(pullRequest).getPullRequest());
assertEquals(comment, payload.setComment(comment).getComment());
}
}

Back to the top