1 // **************************************************************** 2 // Copyright 2007, Charlie Poole 3 // This is free software licensed under the NUnit license. You may 4 // obtain a copy of the license at http://nunit.org/?p=license&r=2.4 5 // **************************************************************** 6 7 using System; 8 9 namespace NUnit.Framework 10 { 11 /// <summary> 12 /// NOTE: The use of asserters for extending NUnit has 13 /// now been replaced by the use of constraints. This 14 /// interface is marked obsolete. 15 /// 16 /// The interface implemented by an asserter. Asserters 17 /// encapsulate a condition test and generation of an 18 /// AssertionException with a tailored message. They 19 /// are used by the Assert class as helper objects. 20 /// 21 /// User-defined asserters may be passed to the 22 /// Assert.DoAssert method in order to implement 23 /// extended asserts. 24 /// </summary> 25 [Obsolete("Use Constraints rather than Asserters for new work")] 26 public interface IAsserter 27 { 28 /// <summary> 29 /// Test the condition for the assertion. 30 /// </summary> 31 /// <returns>True if the test succeeds</returns> Test()32 bool Test(); 33 34 /// <summary> 35 /// Return the message giving the failure reason. 36 /// The return value is unspecified if no failure 37 /// has occured. 38 /// </summary> 39 string Message { get; } 40 } 41 } 42