public void getGitRepositoryUrl_Returns_Expected_Url() { string gitRootPath = GitConfigFileParser.getGitRepositoryRootPath( Directory.GetCurrentDirectory()); string gitUrl = GitConfigFileParser.getGitRepositoryUrl(gitRootPath); Assert.IsTrue(gitUrl.Contains("https://github.com/aws/porting-assistant-dotnet-client") || gitUrl.Contains("[email protected]:aws/porting-assistant-dotnet-client.git")); }
public void getGitRepositoryUrl_Returns_Null_On_Null_Path() { string gitUrl = GitConfigFileParser.getGitRepositoryUrl(null); Assert.AreEqual(null, gitUrl); }
public void getGitRepositoryUrl_Returns_Null_On_Invalid_Path() { string gitUrl = GitConfigFileParser.getGitRepositoryUrl(@"C:\\RandomFile\\Path\\solution\\.git\"); Assert.AreEqual(null, gitUrl); }