コード例 #1
0
        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"));
        }
コード例 #2
0
        public void getGitRepositoryUrl_Returns_Null_On_Null_Path()
        {
            string gitUrl = GitConfigFileParser.getGitRepositoryUrl(null);

            Assert.AreEqual(null, gitUrl);
        }
コード例 #3
0
        public void getGitRepositoryUrl_Returns_Null_On_Invalid_Path()
        {
            string gitUrl = GitConfigFileParser.getGitRepositoryUrl(@"C:\\RandomFile\\Path\\solution\\.git\");

            Assert.AreEqual(null, gitUrl);
        }