Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron S. Hawley2019-08-27 14:49:31 +0000
committerAaron S. Hawley2019-08-27 14:49:31 +0000
commitdd05ab4e1d2ec5b4926aeb6a7f46ba3e4983d5c8 (patch)
tree876eb3032f0a6032e32707898f8a2ad420d2fb14 /org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github
parente6668d94139ad9c4dd1b4f443b5ea107e882ada2 (diff)
downloadegit-github-dd05ab4e1d2ec5b4926aeb6a7f46ba3e4983d5c8.tar.gz
egit-github-dd05ab4e1d2ec5b4926aeb6a7f46ba3e4983d5c8.tar.xz
egit-github-dd05ab4e1d2ec5b4926aeb6a7f46ba3e4983d5c8.zip
Add events field to RepositoryHook
Bug: 389656 Change-Id: Ie8246708604a538e731aee2f5af71e1bd95cc69c Signed-off-by: Aaron S. Hawley <aaron.s.hawley@gmail.com>
Diffstat (limited to 'org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github')
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryHookTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryHookTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryHookTest.java
index 8caaa457..0810135c 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryHookTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/RepositoryHookTest.java
@@ -17,8 +17,10 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
+import java.util.List;
import java.util.Map;
import org.eclipse.egit.github.core.RepositoryHook;
@@ -38,6 +40,7 @@ public class RepositoryHookTest {
RepositoryHook hook = new RepositoryHook();
assertFalse(hook.isActive());
assertNull(hook.getConfig());
+ assertNull(hook.getEvents());
assertNull(hook.getCreatedAt());
assertEquals(0, hook.getId());
assertNull(hook.getLastResponse());
@@ -55,6 +58,8 @@ public class RepositoryHookTest {
assertTrue(hook.setActive(true).isActive());
Map<String, String> config = Collections.singletonMap("a", "b");
assertEquals(config, hook.setConfig(config).getConfig());
+ List<String> events = Arrays.asList("push", "pull_request");
+ assertEquals(events, hook.setEvents(events).getEvents());
assertEquals(new Date(1234), hook.setCreatedAt(new Date(1234))
.getCreatedAt());
assertEquals(150, hook.setId(150).getId());

Back to the top