CollectionAssert.AreEqual CollectionAssert.AreEqual CollectionAssert.AreEqual Method

Definition

Overloads

AreEqual(ICollection, ICollection, IComparer, String, Object[]) AreEqual(ICollection, ICollection, IComparer, String, Object[]) AreEqual(ICollection, ICollection, IComparer, String, Object[])

Tests whether the specified collections are equal and throws an exception if the two collections are not equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal.

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

Tests whether the specified collections are equal and throws an exception if the two collections are not equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal.

AreEqual(ICollection, ICollection, IComparer, String) AreEqual(ICollection, ICollection, IComparer, String) AreEqual(ICollection, ICollection, IComparer, String)

Tests whether the specified collections are equal and throws an exception if the two collections are not equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal.

AreEqual(ICollection, ICollection, IComparer) AreEqual(ICollection, ICollection, IComparer) AreEqual(ICollection, ICollection, IComparer)

Tests whether the specified collections are equal and throws an exception if the two collections are not equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal.

AreEqual(ICollection, ICollection) AreEqual(ICollection, ICollection) AreEqual(ICollection, ICollection)

Tests whether the specified collections are equal and throws an exception if the two collections are not equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal.

AreEqual(ICollection, ICollection, String) AreEqual(ICollection, ICollection, String) AreEqual(ICollection, ICollection, String)

Tests whether the specified collections are equal and throws an exception if the two collections are not equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal.

AreEqual(ICollection, ICollection, IComparer, String, Object[]) AreEqual(ICollection, ICollection, IComparer, String, Object[]) AreEqual(ICollection, ICollection, IComparer, String, Object[])

Tests whether the specified collections are equal and throws an exception if the two collections are not equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal.

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

Parameters

expected
ICollection ICollection ICollection

The first collection to compare. This is the collection the tests expects.

actual
ICollection ICollection ICollection

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

comparer
IComparer IComparer IComparer

The compare implementation to use when comparing elements of the collection.

message
String String String

The message to include in the exception when actual is not equal to expected. The message is shown in test results.

parameters
Object[]

An array of parameters to use when formatting message.

Exceptions

Thrown if expected is not equal to actual.

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

Tests whether the specified collections are equal and throws an exception if the two collections are not equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal.

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

Parameters

expected
ICollection ICollection ICollection

The first collection to compare. This is the collection the tests expects.

actual
ICollection ICollection ICollection

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

message
String String String

The message to include in the exception when actual is not equal to expected. The message is shown in test results.

parameters
Object[]

An array of parameters to use when formatting message.

Exceptions

Thrown if expected is not equal to actual.

AreEqual(ICollection, ICollection, IComparer, String) AreEqual(ICollection, ICollection, IComparer, String) AreEqual(ICollection, ICollection, IComparer, String)

Tests whether the specified collections are equal and throws an exception if the two collections are not equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal.

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

Parameters

expected
ICollection ICollection ICollection

The first collection to compare. This is the collection the tests expects.

actual
ICollection ICollection ICollection

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

comparer
IComparer IComparer IComparer

The compare implementation to use when comparing elements of the collection.

message
String String String

The message to include in the exception when actual is not equal to expected. The message is shown in test results.

Exceptions

Thrown if expected is not equal to actual.

AreEqual(ICollection, ICollection, IComparer) AreEqual(ICollection, ICollection, IComparer) AreEqual(ICollection, ICollection, IComparer)

Tests whether the specified collections are equal and throws an exception if the two collections are not equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal.

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

Parameters

expected
ICollection ICollection ICollection

The first collection to compare. This is the collection the tests expects.

actual
ICollection ICollection ICollection

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

comparer
IComparer IComparer IComparer

The compare implementation to use when comparing elements of the collection.

Exceptions

Thrown if expected is not equal to actual.

AreEqual(ICollection, ICollection) AreEqual(ICollection, ICollection) AreEqual(ICollection, ICollection)

Tests whether the specified collections are equal and throws an exception if the two collections are not equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal.

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

Parameters

expected
ICollection ICollection ICollection

The first collection to compare. This is the collection the tests expects.

actual
ICollection ICollection ICollection

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

Exceptions

Thrown if expected is not equal to actual.

AreEqual(ICollection, ICollection, String) AreEqual(ICollection, ICollection, String) AreEqual(ICollection, ICollection, String)

Tests whether the specified collections are equal and throws an exception if the two collections are not equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal.

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

Parameters

expected
ICollection ICollection ICollection

The first collection to compare. This is the collection the tests expects.

actual
ICollection ICollection ICollection

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

message
String String String

The message to include in the exception when actual is not equal to expected. The message is shown in test results.

Exceptions

Thrown if expected is not equal to actual.

Applies to