public static string GetGitBranchName() { var gitBranchFilePath = Path.Combine(TestFileHelpers.GetSolutionDirectory(), @"EfCoreInAction\wwwroot", "GitBranchName.txt"); var branchName = File.ReadAllText(gitBranchFilePath); return(branchName); }
public static IConfigurationRoot GetConfiguration() { var testDir = Path.Combine(TestFileHelpers.GetSolutionDirectory(), "test"); var builder = new ConfigurationBuilder() .SetBasePath(testDir) .AddJsonFile("appsettings.json", optional: false, reloadOnChange: false) .AddEnvironmentVariables(); return(builder.Build()); }