[NUI] Rebase develnui (DevelNUI only patches --> master) (#3910)
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Devel.Tests.Ubuntu / nunit.framework / Constraints / ExceptionNotThrownConstraint.cs
1 #define PORTABLE
2 #define TIZEN
3 #define NUNIT_FRAMEWORK
4 #define NUNITLITE
5 #define NET_4_5
6 #define PARALLEL
7 using System;
8
9 namespace NUnit.Framework.Constraints
10 {
11     internal class ExceptionNotThrownConstraint : Constraint
12     {
13         /// <summary>
14         /// The Description of what this constraint tests, for
15         /// use in messages and in the ConstraintResult.
16         /// </summary>
17         public override string Description
18         {
19             get { return "No Exception to be thrown"; }
20         }
21
22         /// <summary>
23         /// Applies the constraint to an actual value, returning a ConstraintResult.
24         /// </summary>
25         /// <param name="actual">The value to be tested</param>
26         /// <returns>A ConstraintResult</returns>
27         public override ConstraintResult ApplyTo<TActual>(TActual actual)
28         {
29             var exception = actual as Exception;
30             return new ConstraintResult(this, exception, exception == null);
31         }
32     }
33 }