2010-05-21 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / nunit24 / NUnitCore / interfaces / ITestFilter.cs
1 // ****************************************************************\r
2 // Copyright 2007, Charlie Poole\r
3 // This is free software licensed under the NUnit license. You may\r
4 // obtain a copy of the license at http://nunit.org/?p=license&r=2.4\r
5 // ****************************************************************\r
6 using System;\r
7 \r
8 namespace NUnit.Core\r
9 {\r
10         /// <summary>\r
11         /// Interface to be implemented by filters applied to tests.\r
12         /// The filter applies when running the test, after it has been\r
13         /// loaded, since this is the only time an ITest exists.\r
14         /// </summary>\r
15         public interface ITestFilter\r
16         {\r
17                 /// <summary>\r
18                 /// Indicates whether this is the EmptyFilter\r
19                 /// </summary>\r
20                 bool IsEmpty { get; }\r
21 \r
22                 /// <summary>\r
23                 /// Determine if a particular test passes the filter criteria. Pass\r
24                 /// may examine the parents and/or descendants of a test, depending\r
25                 /// on the semantics of the particular filter\r
26                 /// </summary>\r
27                 /// <param name="test">The test to which the filter is applied</param>\r
28                 /// <returns>True if the test passes the filter, otherwise false</returns>\r
29                 bool Pass( ITest test );\r
30 \r
31                 /// <summary>\r
32                 /// Determine whether the test itself matches the filter criteria,\r
33                 /// without examining either parents or descendants.\r
34                 /// </summary>\r
35                 /// <param name="test">The test to which the filter is applied</param>\r
36                 /// <returns>True if the filter matches the any parent of the test</returns>\r
37                 bool Match( ITest test );\r
38         }\r
39 }\r