Merge branch 'master' of git://github.com/mono/mono
[mono.git] / mcs / nunit24 / NUnitFramework / framework / IAsserter.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 \r
7 using System;\r
8 \r
9 namespace NUnit.Framework\r
10 {\r
11         /// <summary>\r
12         /// NOTE: The use of asserters for extending NUnit has\r
13         /// now been replaced by the use of constraints. This\r
14         /// interface is marked obsolete.\r
15         /// \r
16         /// The interface implemented by an asserter. Asserters\r
17         /// encapsulate a condition test and generation of an\r
18         /// AssertionException with a tailored message. They\r
19         /// are used by the Assert class as helper objects.\r
20         /// \r
21         /// User-defined asserters may be passed to the\r
22         /// Assert.DoAssert method in order to implement\r
23         /// extended asserts.\r
24         /// </summary>\r
25         [Obsolete("Use Constraints rather than Asserters for new work")]\r
26         public interface IAsserter\r
27         {\r
28                 /// <summary>\r
29                 /// Test the condition for the assertion.\r
30                 /// </summary>\r
31                 /// <returns>True if the test succeeds</returns>\r
32                 bool Test();\r
33 \r
34                 /// <summary>\r
35                 /// Return the message giving the failure reason.\r
36                 /// The return value is unspecified if no failure\r
37                 /// has occured.\r
38                 /// </summary>\r
39                 string Message { get; }\r
40         }\r
41 }\r