@@ -0,0 +1,1854 @@
+package hudson.plugins.git.browser;%0A%0Aimport hudson.plugins.git.GitChangeSet;%0Aimport java.io.IOException;%0Aimport java.net.URL;%0Aimport org.junit.Test;%0Aimport static org.junit.Assert.*;%0A%0Apublic class PhabricatorTest %7B%0A%0A    private final String repoName = %22phabricatorRepo%22;%0A    private final String repoUrl = %22http://phabricator.example.com/%22;%0A    private final Phabricator phabricator;%0A%0A    private final GitChangeSetSample sample;%0A%0A    public PhabricatorTest() %7B%0A        phabricator = new Phabricator(repoUrl, repoName);%0A        sample = new GitChangeSetSample(true);%0A    %7D%0A%0A    @Test%0A    public void testGetRepo() throws IOException %7B%0A        assertEquals(repoName, phabricator.getRepo());%0A    %7D%0A%0A    @Test%0A    public void testGetChangeSetLink() throws Exception %7B%0A        URL result = phabricator.getChangeSetLink(sample.changeSet);%0A        assertEquals(new URL(repoUrl + %22r%22 + repoName + sample.id), result);%0A    %7D%0A%0A    @Test%0A    public void testGetDiffLink() throws Exception %7B%0A        for (GitChangeSet.Path path : sample.changeSet.getPaths()) %7B%0A            URL diffLink = phabricator.getDiffLink(path);%0A            URL expectedDiffLink = new URL(repoUrl + %22diffusion/%22 + repoName + %22/change/master/%22 + path.getPath() + %22;%22 + sample.id);%0A            String msg = %22Wrong link for path: %22 + path.getPath();%0A            assertEquals(msg, expectedDiffLink, diffLink);%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void testGetFileLink() throws Exception %7B%0A        for (GitChangeSet.Path path : sample.changeSet.getPaths()) %7B%0A            URL fileLink = phabricator.getDiffLink(path);%0A            URL expectedFileLink = new URL(repoUrl + %22diffusion/%22 + repoName + %22/change/master/%22 + path.getPath() + %22;%22 + sample.id);%0A            String msg = %22Wrong link for path: %22 + path.getPath();%0A            assertEquals(msg, expectedFileLink, fileLink);%0A        %7D%0A    %7D%0A%0A%7D%0A

Add test for Phabricator repo browser