#define PORTABLE #define TIZEN #define NUNIT_FRAMEWORK #define NUNITLITE #define NET_4_5 #define PARALLEL using System; namespace NUnit.Framework.Constraints { internal class ExceptionNotThrownConstraint : Constraint { /// /// The Description of what this constraint tests, for /// use in messages and in the ConstraintResult. /// public override string Description { get { return "No Exception to be thrown"; } } /// /// Applies the constraint to an actual value, returning a ConstraintResult. /// /// The value to be tested /// A ConstraintResult public override ConstraintResult ApplyTo(TActual actual) { var exception = actual as Exception; return new ConstraintResult(this, exception, exception == null); } } }