Team Test API
Assert..::.AreNotEqual<(Of <(T>)>) Method (T, T, String)

Verifies that two specified generic type data are not equal. The assertion fails if they are equal. Displays a message if the assertion fails.

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

Visual Basic (Declaration)
Public Shared Sub AreNotEqual(Of T) ( _
    notExpected As T, _
    actual As T, _
    message As String _
)
Visual Basic (Usage)
Dim notExpected As T
Dim actual As T
Dim message As String

Assert.AreNotEqual(notExpected, actual, _
    message)
C#
public static void AreNotEqual<T>(
    T notExpected,
    T actual,
    string message
)
Visual C++
public:
generic<typename T>
static void AreNotEqual(
    T notExpected, 
    T actual, 
    String^ message
)
JScript
JScript does not support generic types or methods.

Type Parameters

T

Parameters

notExpected
Type: T
The first generic type data to compare. This is the generic type data the unit test expects not to match actual.
actual
Type: T
message
Type: System..::.String
Exceptions

ExceptionCondition
AssertFailedException

notExpected is equal to actual.

Remarks

T is the type of values to compare.

Permissions

See Also

Reference

Other Resources

Page view tracker