AssertFailedException Class

Definition

AssertFailedException class. Used to indicate failure for a test case.

public ref class AssertFailedException : Microsoft::VisualStudio::TestTools::UnitTesting::UnitTestAssertException
public class AssertFailedException : Microsoft.VisualStudio.TestTools.UnitTesting.UnitTestAssertException
[System.Serializable]
public class AssertFailedException : Microsoft.VisualStudio.TestTools.UnitTesting.UnitTestAssertException
[System.Serializable]
[System.Runtime.CompilerServices.Nullable(0)]
public class AssertFailedException : Microsoft.VisualStudio.TestTools.UnitTesting.UnitTestAssertException
type AssertFailedException = class
    inherit UnitTestAssertException
[<System.Serializable>]
type AssertFailedException = class
    inherit UnitTestAssertException
[<System.Serializable>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type AssertFailedException = class
    inherit UnitTestAssertException
Public Class AssertFailedException
Inherits UnitTestAssertException
Inheritance
AssertFailedException
Attributes

Constructors

Name Description
AssertFailedException()

Initializes a new instance of the AssertFailedException class.

AssertFailedException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the AssertFailedException class.

AssertFailedException(String, Exception)

Initializes a new instance of the AssertFailedException class.

AssertFailedException(String)

Initializes a new instance of the AssertFailedException class.

Properties

Name Description
ActualText

Gets the pre-formatted text representation of the actual value, as displayed in the actual: line of the structured assertion message. Returns null when the assertion has no natural actual value.

ExpectedText

Gets the pre-formatted text representation of the expected value, as displayed in the expected: line of the structured assertion message. Returns null when the assertion has no natural expected value (e.g. Fail(String)).

Message (Inherited from UnitTestAssertException)

Methods

Name Description
GetObjectData(SerializationInfo, StreamingContext) (Inherited from UnitTestAssertException)

Applies to