Assert.Fail Method
Fails the assertion without checking any conditions.
Namespace: Microsoft.VisualStudio.TestTools.UnitTesting
Assembly: Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)
Syntax
'Declaration
Public Shared Sub Fail
public static void Fail()
public:
static void Fail()
static member Fail : unit -> unit
public static function Fail()
Exceptions
Exception | Condition |
---|---|
AssertFailedException | Always thrown. |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualStudio.TestTools.UnitTesting Namespace