public static int Main(string[] args) { options = new ConsoleOptions (); options.ProcessArgs (args); args = options.RemainingArguments; NUnit.Core.TestDomain domain = new NUnit.Core.TestDomain(); if (args.Length < 1) { options.DoUsage (); return 1; } string assembly = args [0]; Console.WriteLine ("ASSEMBLY: " + assembly); Test test; if (args.Length == 1) test = domain.LoadAssembly (assembly); else test = domain.LoadAssembly (assembly, args [1]); if (test == null) { Console.Error.WriteLine("\nERROR: Unable to load test suite from assembly {0}", assembly); return 1; } Directory.SetCurrentDirectory(new FileInfo(assembly).DirectoryName); string xmlResult = "result.xml"; XmlTextReader reader = GetTransformReader(); ConsoleUi consoleUi = new ConsoleUi(domain, xmlResult, reader); return consoleUi.Execute(); }
public static int Main(string[] args) { options = new ConsoleOptions(); options.ProcessArgs(args); args = options.RemainingArguments; NUnit.Core.TestDomain domain = new NUnit.Core.TestDomain(); if (args.Length < 1) { options.DoUsage(); return(1); } string assembly = args [0]; Console.WriteLine("ASSEMBLY: " + assembly); Test test; if (args.Length == 1) { test = domain.LoadAssembly(assembly); } else { test = domain.LoadAssembly(assembly, args [1]); } if (test == null) { Console.Error.WriteLine("\nERROR: Unable to load test suite from assembly {0}", assembly); return(1); } Directory.SetCurrentDirectory(new FileInfo(assembly).DirectoryName); string xmlResult = "result.xml"; XmlTextReader reader = GetTransformReader(); ConsoleUi consoleUi = new ConsoleUi(domain, xmlResult, reader); return(consoleUi.Execute()); }
public ConsoleUi(NUnit.Core.TestDomain testDomain, string xmlFile, XmlTextReader reader) { this.testDomain = testDomain; outputFile = xmlFile; transformReader = reader; }