Пример #1
0
 public Warmup(IMessageSink messageSink)
     : base(messageSink)
 {
     // Place initialization code here
     Globalization.SetFormattingExceptionResourceCulture(new CultureInfo("nl-NL"));
     Globalization.SetKeywordResourceCulture(new CultureInfo("nl-NL"));
 }
Пример #2
0
 public async void ShouldReturnDebugInformation(string yamlFile)
 {
     // IMPORTANT please the nl-NL language at the end of the collection, as other
     // tests are primarily tested under nl-NL yaml test files.
     foreach (var language in new[] { "nl-NL", "en-US" })
     {
         Globalization.SetKeywordResourceCulture(new System.Globalization.CultureInfo(language));
         Globalization.SetFormattingExceptionResourceCulture(new System.Globalization.CultureInfo(language));
         var controller = new YamlScriptController();
         var result     = controller.Parse(YamlTestFileLoader.Load($"Malformed/{language}/{yamlFile}.yaml"));
         Assert.True(result.IsError);
         Assert.NotNull(result.Exceptions);
         Assert.NotNull(result.Message);
         Assert.True(result.Exceptions.Exceptions.Count == 1);
         Assert.NotNull(result.Exceptions.Exceptions[0].DebugInfo);
         Output.WriteLine($"{language} message: {result.Message} {result.Exceptions.Exceptions[0].DebugInfo}");
     }
 }