다음을 통해 공유


CollectionAssert.AreNotEquivalent Method

Definition

Overloads

AreNotEquivalent(ICollection, ICollection)

Tests whether two collections contain the different elements and throws an exception if the two collections contain identical elements without regard to order.

AreNotEquivalent(ICollection, ICollection, String)

Tests whether two collections contain the different elements and throws an exception if the two collections contain identical elements without regard to order.

AreNotEquivalent(ICollection, ICollection, String, Object[])

Tests whether two collections contain the different elements and throws an exception if the two collections contain identical elements without regard to order.

AreNotEquivalent(ICollection, ICollection)

Tests whether two collections contain the different elements and throws an exception if the two collections contain identical elements without regard to order.

public:
 static void AreNotEquivalent(System::Collections::ICollection ^ expected, System::Collections::ICollection ^ actual);
public static void AreNotEquivalent (System.Collections.ICollection expected, System.Collections.ICollection actual);
static member AreNotEquivalent : System.Collections.ICollection * System.Collections.ICollection -> unit
Public Shared Sub AreNotEquivalent (expected As ICollection, actual As ICollection)

Parameters

expected
ICollection

The first collection to compare. This contains the elements the test expects to be different than the actual collection.

actual
ICollection

The second collection to compare. This is the collection produced by the code under test.

Exceptions

Thrown if the two collections contained the same elements, including the same number of duplicate occurrences of each element.

Applies to

AreNotEquivalent(ICollection, ICollection, String)

Tests whether two collections contain the different elements and throws an exception if the two collections contain identical elements without regard to order.

public:
 static void AreNotEquivalent(System::Collections::ICollection ^ expected, System::Collections::ICollection ^ actual, System::String ^ message);
public static void AreNotEquivalent (System.Collections.ICollection expected, System.Collections.ICollection actual, string message);
static member AreNotEquivalent : System.Collections.ICollection * System.Collections.ICollection * string -> unit
Public Shared Sub AreNotEquivalent (expected As ICollection, actual As ICollection, message As String)

Parameters

expected
ICollection

The first collection to compare. This contains the elements the test expects to be different than the actual collection.

actual
ICollection

The second collection to compare. This is the collection produced by the code under test.

message
String

The message to include in the exception when actual contains the same elements as expected. The message is shown in test results.

Exceptions

Thrown if the two collections contained the same elements, including the same number of duplicate occurrences of each element.

Applies to

AreNotEquivalent(ICollection, ICollection, String, Object[])

Tests whether two collections contain the different elements and throws an exception if the two collections contain identical elements without regard to order.

public:
 static void AreNotEquivalent(System::Collections::ICollection ^ expected, System::Collections::ICollection ^ actual, System::String ^ message, ... cli::array <System::Object ^> ^ parameters);
public static void AreNotEquivalent (System.Collections.ICollection expected, System.Collections.ICollection actual, string message, params object[] parameters);
static member AreNotEquivalent : System.Collections.ICollection * System.Collections.ICollection * string * obj[] -> unit
Public Shared Sub AreNotEquivalent (expected As ICollection, actual As ICollection, message As String, ParamArray parameters As Object())

Parameters

expected
ICollection

The first collection to compare. This contains the elements the test expects to be different than the actual collection.

actual
ICollection

The second collection to compare. This is the collection produced by the code under test.

message
String

The message to include in the exception when actual contains the same elements as expected. The message is shown in test results.

parameters
Object[]

An array of parameters to use when formatting message.

Exceptions

Thrown if the two collections contained the same elements, including the same number of duplicate occurrences of each element.

Applies to