@Test public void github_parsesSshGitConfig_variation() throws Exception { GithubRepo repo = new GithubRepo(".", "test/test_github_gitconfig_ssh_variation.txt"); assertEquals( "https://git.squareup.com/square/java/blob/master/projectX/src/main/java/com/ex/Ex.java", repo.repoUrlFor("/projectX/src/main/java/com/ex/Ex.java")); }
@Test public void invalidGitConfig() throws Exception { GithubRepo repo = new GithubRepo(".", "test/test_github_gitconfig_invalid.txt"); expectedException.expect(RuntimeException.class); expectedException.expectMessage("Did not find"); repo.repoUrlFor("/projectX/src/main/java/com/ex/Ex.java"); }