Пример #1
0
		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();
		}
Пример #2
0
    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());
    }
Пример #3
0
		public ConsoleUi(NUnit.Core.TestDomain testDomain, string xmlFile, XmlTextReader reader)
		{
			this.testDomain = testDomain;
			outputFile = xmlFile;
			transformReader = reader;
		}
Пример #4
0
 public ConsoleUi(NUnit.Core.TestDomain testDomain, string xmlFile, XmlTextReader reader)
 {
     this.testDomain = testDomain;
     outputFile      = xmlFile;
     transformReader = reader;
 }