@Test public void shouldParseHttpUri() throws URISyntaxException { String uri = "http://user1%40host.com@host:7990/scm/project/repo.git"; PullRequestNotifyEvent event = new PullRequestNotifyEvent(new URIish(uri), null); assertEquals("project", event.getProject()); assertEquals("repo", event.getRepository()); }
@Test public void shouldParseProjectUri() throws URISyntaxException { String uri = "ssh://git@host:7999/project/repo.git"; PullRequestNotifyEvent event = new PullRequestNotifyEvent(new URIish(uri), null); assertEquals("project", event.getProject()); assertEquals("repo", event.getRepository()); }