Udostępnij za pośrednictwem


AssertFailedException Class

Used to indicate failure for a test.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Syntax

'Declaration
Public Class AssertFailedException _
    Inherits UnitTestAssertException
'Usage
Dim instance As AssertFailedException
public class AssertFailedException : UnitTestAssertException
public ref class AssertFailedException : public UnitTestAssertException
public class AssertFailedException extends UnitTestAssertException

Remarks

This is thrown whenever an assertion fails.

Inheritance Hierarchy

System.Object
  System.Exception
    Microsoft.VisualStudio.TestTools.UnitTesting.UnitTestAssertException
      Microsoft.VisualStudio.TestTools.UnitTesting.AssertFailedException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

AssertFailedException Members

Microsoft.VisualStudio.TestTools.UnitTesting Namespace

Other Resources

Using the Assert Classes