Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
NUnitLiteLauncher.Console.cs
Go to the documentation of this file.
1 // ***********************************************************************
2 // Copyright (c) 2009 Charlie Poole
3 //
4 // Permission is hereby granted, free of charge, to any person obtaining
5 // a copy of this software and associated documentation files (the
6 // "Software"), to deal in the Software without restriction, including
7 // without limitation the rights to use, copy, modify, merge, publish,
8 // distribute, sublicense, and/or sell copies of the Software, and to
9 // permit persons to whom the Software is furnished to do so, subject to
10 // the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be
13 // included in all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 // ***********************************************************************
23 
24 using System;
25 using System.Collections.Generic;
26 using System.Reflection;
27 using NUnitLite.Runner;
28 
29 namespace NUnitLite.Tests
30 {
31  class Program
32  {
33  // The main program executes the tests. Output may be routed to
34  // various locations, depending on the arguments passed.
35  //
36  // Arguments:
37  //
38  // Arguments may be names of assemblies or options prefixed with '/'
39  // or '-'. Normally, no assemblies are passed and the calling
40  // assembly (the one containing this Main) is used. The following
41  // options are accepted:
42  //
43  // -test:<testname> Provides the name of a test to be exected.
44  // May be repeated. If this option is not used,
45  // all tests are run.
46  //
47  // -out:PATH Path to a file to which output is written.
48  // If omitted, Console is used, which means the
49  // output is lost on a platform with no Console.
50  //
51  // -full Print full report of all tests.
52  //
53  // -result:PATH Path to a file to which the XML test result is written.
54  //
55  // -explore[:Path] If specified, list tests rather than executing them. If a
56  // path is given, an XML file representing the tests is written
57  // to that location. If not, output is to the Console.
58  //
59  // -noheader,noh Suppress display of the initial message.
60  //
61  // -wait Wait for a keypress before exiting.
62  //
63  // Examples:
64  //
65  // Sending output to the console works on desktop Windows and Windows CE.
66  //
67  // new ConsoleUI().Execute( args );
68  //
69  // Debug output works on all platforms.
70  //
71  // new DebugUI().Execute( args );
72  //
73  // Sending output to a file works on all platforms, but care must be taken
74  // to write to an accessible location on some platforms.
75  //
76  // string myDocs = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
77  // string path = System.IO.Path.Combine( myDocs, "TestResult.txt" );
78  // System.IO.TextWriter writer = new System.IO.StreamWriter(output);
79  // new TextUI( writer ).Execute( args );
80  // writer.Close();
81  //
82  // NOTE: Sending output to TCP doesn't work yet
83  //
84  static void Main(string[] args)
85  {
86  new TextUI().Execute(args);
87  }
88  }
89 }
SiliconStudio.Paradox.Graphics.Regression.TextUI TextUI