private static void tryRunTests() { AppDomain.CurrentDomain.UnhandledException += CurrentDomainUnhandledExceptionHandler; try { var parser = new OptionsXmlReader(_arguments.InputFile); parser.Parse(); if (!parser.IsValid) return; run(parser); var writer = new ResultsXmlWriter(_results); writer.Write(_arguments.OutputFile); } catch (Exception ex) { try { var result = new List<TestResult>(); result.Add(ErrorHandler.GetError("Init", ex)); var writer = new ResultsXmlWriter(result); writer.Write(_arguments.OutputFile); } catch { Console.WriteLine(ex.ToString()); } } }
public void When_file_does_not_exist_plugins_should_be_null() { var parser = new OptionsXmlReader(""); parser.Parse(); Assert.That(parser.Plugins, Is.Null); Assert.That(parser.IsValid, Is.False); }
public void When_file_does_not_exist_options_should_be_null() { var parser = new OptionsXmlReader(""); parser.Parse(); Assert.That(parser.Options, Is.Null); }
public void SetUp() { _parser = new OptionsXmlReader(getPath("TestOptions.xml")); _parser.Parse(); }