* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / nunit20 / util / ITestLoader.cs
1 #region Copyright (c) 2002-2003, James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole, Philip A. Craig
2 /************************************************************************************
3 '
4 ' Copyright  2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole
5 ' Copyright  2000-2002 Philip A. Craig
6 '
7 ' This software is provided 'as-is', without any express or implied warranty. In no 
8 ' event will the authors be held liable for any damages arising from the use of this 
9 ' software.
10
11 ' Permission is granted to anyone to use this software for any purpose, including 
12 ' commercial applications, and to alter it and redistribute it freely, subject to the 
13 ' following restrictions:
14 '
15 ' 1. The origin of this software must not be misrepresented; you must not claim that 
16 ' you wrote the original software. If you use this software in a product, an 
17 ' acknowledgment (see the following) in the product documentation is required.
18 '
19 ' Portions Copyright  2002-2003 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov, Charlie Poole
20 ' or Copyright  2000-2002 Philip A. Craig
21 '
22 ' 2. Altered source versions must be plainly marked as such, and must not be 
23 ' misrepresented as being the original software.
24 '
25 ' 3. This notice may not be removed or altered from any source distribution.
26 '
27 '***********************************************************************************/
28 #endregion
29
30 using System;
31 using System.Collections;
32 using NUnit.Core;
33
34 namespace NUnit.Util
35 {
36         /// <summary>
37         /// The ITestLoader interface supports the loading and running
38         /// of tests in a remote domain. In addition to methods for
39         /// performing these operations, it inherits from the ITestEvents
40         /// interface to provide appropriate events. The two interfaces
41         /// are kept separate so that client objects not intended to
42         /// issue commands can just handle the first interface.
43         /// </summary>
44         public interface ITestLoader
45         {
46                 #region Properties
47
48                 // See if a project is loaded
49                 bool IsProjectLoaded { get; }
50
51                 // See if a test has been loaded from the project
52                 bool IsTestLoaded { get; }
53
54                 // See if a test is running
55                 bool IsTestRunning { get; }
56
57                 // The loaded test project
58                 NUnitProject TestProject { get; set; }
59
60                 string TestFileName { get; }
61
62                 // Our last test results
63                 TestResult[] Results { get; }
64
65                 #endregion
66
67                 #region Methods
68
69                 // Create a new empty project using a default name
70                 void NewProject();
71
72                 // Create a new project given a filename
73                 void NewProject( string filename );
74
75                 // Load a project given a filename
76                 void LoadProject( string filename );
77
78                 // Load a project given a filename and config
79                 void LoadProject( string filename, string configname );
80
81                 // Load a project given an array of assemblies
82                 void LoadProject( string[] assemblies );
83
84                 // Unload current project
85                 void UnloadProject();
86
87                 // Load tests for current project and config
88                 void LoadTest();
89
90                 // Load a specific test for current project and config
91                 void LoadTest( string testName );
92
93                 // Unload current test
94                 void UnloadTest();
95                 
96                 // Reload current test
97                 void ReloadTest();
98
99                 // Set a filter for running tests
100                 void SetFilter( IFilter filter );
101
102                 // Run a test suite
103                 void RunTest( ITest test );
104
105                 // Run a collection of tests
106                 void RunTests(ITest[] tests);
107
108                 // Cancel the running test
109                 void CancelTestRun();
110
111                 #endregion
112         }
113 }