CollectionAssert.AreNotEqual Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AreNotEqual(ICollection, ICollection, String, Object[]) |
Tests whether the specified collections are unequal and throws an exception if the two collections are equal. Equality is defined as having the same elements in the same order and quantity. Whether two elements are the same is checked using Equals(Object, Object) method. Different references to the same value are considered equal. |
AreNotEqual(ICollection, ICollection, IComparer, String, Object[]) |
Tests whether the specified collections are unequal and throws an exception if the two collections are equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal. |
AreNotEqual(ICollection, ICollection, IComparer, String) |
Tests whether the specified collections are unequal and throws an exception if the two collections are equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal. |
AreNotEqual(ICollection, ICollection, IComparer) |
Tests whether the specified collections are unequal and throws an exception if the two collections are equal. Equality is defined as having the same elements in the same order and quantity. Different references to the same value are considered equal. |
AreNotEqual(ICollection, ICollection) |
Tests whether the specified collections are unequal and throws an exception if the two collections are equal. Equality is defined as having the same elements in the same order and quantity. Whether two elements are the same is checked using Equals(Object, Object) method. Different references to the same value are considered equal. |
AreNotEqual(ICollection, ICollection, String) |
Tests whether the specified collections are unequal and throws an exception if the two collections are equal. Equality is defined as having the same elements in the same order and quantity. Whether two elements are the same is checked using Equals(Object, Object) method. Different references to the same value are considered equal. |
AreNotEqual(ICollection, ICollection, String, Object[])
Tests whether the specified collections are unequal and throws an exception if the two collections are equal. Equality is defined as having the same elements in the same order and quantity. Whether two elements are the same is checked using Equals(Object, Object) method. Different references to the same value are considered equal.
public:
static void AreNotEqual(System::Collections::ICollection ^ notExpected, System::Collections::ICollection ^ actual, System::String ^ message, ... cli::array <System::Object ^> ^ parameters);
public static void AreNotEqual (System.Collections.ICollection notExpected, System.Collections.ICollection actual, string message, params object[] parameters);
static member AreNotEqual : System.Collections.ICollection * System.Collections.ICollection * string * obj[] -> unit
Public Shared Sub AreNotEqual (notExpected As ICollection, actual As ICollection, message As String, ParamArray parameters As Object())
Parameters
- notExpected
- ICollection
The first collection to compare. This is the collection the tests expects
not to match actual
.
- 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
is equal to notExpected
. The message is shown in
test results.
- parameters
- Object[]
An array of parameters to use when formatting message
.
Exceptions
Thrown if notExpected
is equal to actual
.
Applies to
AreNotEqual(ICollection, ICollection, IComparer, String, Object[])
Tests whether the specified collections are unequal and throws an exception if the two collections are 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 AreNotEqual(System::Collections::ICollection ^ notExpected, System::Collections::ICollection ^ actual, System::Collections::IComparer ^ comparer, System::String ^ message, ... cli::array <System::Object ^> ^ parameters);
public static void AreNotEqual (System.Collections.ICollection notExpected, System.Collections.ICollection actual, System.Collections.IComparer comparer, string message, params object[] parameters);
static member AreNotEqual : System.Collections.ICollection * System.Collections.ICollection * System.Collections.IComparer * string * obj[] -> unit
Public Shared Sub AreNotEqual (notExpected As ICollection, actual As ICollection, comparer As IComparer, message As String, ParamArray parameters As Object())
Parameters
- notExpected
- ICollection
The first collection to compare. This is the collection the tests expects
not to match actual
.
- actual
- ICollection
The second collection to compare. This is the collection produced by the code under test.
- comparer
- IComparer
The compare implementation to use when comparing elements of the collection.
- message
- String
The message to include in the exception when actual
is equal to notExpected
. The message is shown in
test results.
- parameters
- Object[]
An array of parameters to use when formatting message
.
Exceptions
Thrown if notExpected
is equal to actual
.
Applies to
AreNotEqual(ICollection, ICollection, IComparer, String)
Tests whether the specified collections are unequal and throws an exception if the two collections are 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 AreNotEqual(System::Collections::ICollection ^ notExpected, System::Collections::ICollection ^ actual, System::Collections::IComparer ^ comparer, System::String ^ message);
public static void AreNotEqual (System.Collections.ICollection notExpected, System.Collections.ICollection actual, System.Collections.IComparer comparer, string message);
static member AreNotEqual : System.Collections.ICollection * System.Collections.ICollection * System.Collections.IComparer * string -> unit
Public Shared Sub AreNotEqual (notExpected As ICollection, actual As ICollection, comparer As IComparer, message As String)
Parameters
- notExpected
- ICollection
The first collection to compare. This is the collection the tests expects
not to match actual
.
- actual
- ICollection
The second collection to compare. This is the collection produced by the code under test.
- comparer
- IComparer
The compare implementation to use when comparing elements of the collection.
- message
- String
The message to include in the exception when actual
is equal to notExpected
. The message is shown in
test results.
Exceptions
Thrown if notExpected
is equal to actual
.
Applies to
AreNotEqual(ICollection, ICollection, IComparer)
Tests whether the specified collections are unequal and throws an exception if the two collections are 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 AreNotEqual(System::Collections::ICollection ^ notExpected, System::Collections::ICollection ^ actual, System::Collections::IComparer ^ comparer);
public static void AreNotEqual (System.Collections.ICollection notExpected, System.Collections.ICollection actual, System.Collections.IComparer comparer);
static member AreNotEqual : System.Collections.ICollection * System.Collections.ICollection * System.Collections.IComparer -> unit
Public Shared Sub AreNotEqual (notExpected As ICollection, actual As ICollection, comparer As IComparer)
Parameters
- notExpected
- ICollection
The first collection to compare. This is the collection the tests expects
not to match actual
.
- actual
- ICollection
The second collection to compare. This is the collection produced by the code under test.
- comparer
- IComparer
The compare implementation to use when comparing elements of the collection.
Exceptions
Thrown if notExpected
is equal to actual
.
Applies to
AreNotEqual(ICollection, ICollection)
Tests whether the specified collections are unequal and throws an exception if the two collections are equal. Equality is defined as having the same elements in the same order and quantity. Whether two elements are the same is checked using Equals(Object, Object) method. Different references to the same value are considered equal.
public:
static void AreNotEqual(System::Collections::ICollection ^ notExpected, System::Collections::ICollection ^ actual);
public static void AreNotEqual (System.Collections.ICollection notExpected, System.Collections.ICollection actual);
static member AreNotEqual : System.Collections.ICollection * System.Collections.ICollection -> unit
Public Shared Sub AreNotEqual (notExpected As ICollection, actual As ICollection)
Parameters
- notExpected
- ICollection
The first collection to compare. This is the collection the tests expects
not to match actual
.
- actual
- ICollection
The second collection to compare. This is the collection produced by the code under test.
Exceptions
Thrown if notExpected
is equal to actual
.
Applies to
AreNotEqual(ICollection, ICollection, String)
Tests whether the specified collections are unequal and throws an exception if the two collections are equal. Equality is defined as having the same elements in the same order and quantity. Whether two elements are the same is checked using Equals(Object, Object) method. Different references to the same value are considered equal.
public:
static void AreNotEqual(System::Collections::ICollection ^ notExpected, System::Collections::ICollection ^ actual, System::String ^ message);
public static void AreNotEqual (System.Collections.ICollection notExpected, System.Collections.ICollection actual, string message);
static member AreNotEqual : System.Collections.ICollection * System.Collections.ICollection * string -> unit
Public Shared Sub AreNotEqual (notExpected As ICollection, actual As ICollection, message As String)
Parameters
- notExpected
- ICollection
The first collection to compare. This is the collection the tests expects
not to match actual
.
- 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
is equal to notExpected
. The message is shown in
test results.
Exceptions
Thrown if notExpected
is equal to actual
.