public void OptionsRoundtrip(string optionsType, string jsonFile) { this_TestCaseName = "OptionsRoundtrip"; TestFixture(); var testCaseName = optionsType; InitializeUnitTest(testCaseName); var errorMessage = string.Empty; var jsonFilesRoot = Path.Combine(g_TestCasesDir, "options", "JSON"); var jsonFileSrcPath = Path.Combine(jsonFilesRoot, jsonFile); var jsonFileDstPath = Path.Combine(this_TestCaseOutputDir, Path.GetFileName(jsonFileSrcPath)); File.Copy(jsonFileSrcPath, jsonFileDstPath); File.WriteAllText(jsonFileDstPath, File.ReadAllText(jsonFileDstPath).Replace("$testCaseProject$", this_TestCaseProject.FullPath.Replace("\\", "/"))); ApplicationOptions options = optionsType == "SvcutilOptions" ? SvcutilOptions.FromFile(jsonFileDstPath) : UpdateOptions.FromFile(jsonFileDstPath); WriteLog("", options.ToString()); Assert.True(ValidateJson(options, jsonFileSrcPath, out errorMessage), errorMessage); ValidateTest(options.ToString(), this_TestCaseProject.DirectoryPath, 0, string.Empty, true); }
public IActionResult Get() { Log.Information("ConfigurationOptions:{@configurationOptions}", _configurationOptions.ToString()); _logglyEvent.Data.Add("ClientAppSettings:", "{0}", _configurationOptions.ToString()); _logglyClient.Log(_logglyEvent); return(Ok(new { _configurationOptions.OpenIdConnectConfiguration, _configurationOptions.LogglyClientConfiguration, })); }