コード例 #1
0
        public static string GetGitBranchName()
        {
            var gitBranchFilePath = Path.Combine(TestFileHelpers.GetSolutionDirectory(), @"EfCoreInAction\wwwroot", "GitBranchName.txt");
            var branchName        = File.ReadAllText(gitBranchFilePath);

            return(branchName);
        }
コード例 #2
0
        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());
        }