public void Environment_ForBranchName() { const string envName = "DOCFX_SOURCE_BRANCH_NAME"; var original = Environment.GetEnvironmentVariable(envName); try { Environment.SetEnvironmentVariable(envName, "special-branch"); var info = GitUtility.GetFileDetail(Directory.GetCurrentDirectory()); Assert.Equal("special-branch", info.RemoteBranch); } finally { Environment.SetEnvironmentVariable(envName, original); } }
public void Environment_ForBranchName() { var info = GitUtility.GetFileDetail(Directory.GetCurrentDirectory()); Assert.Equal("special-branch", info.RemoteBranch); }