CollectionAssert.AreNotEquivalent 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
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<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>) |
Tests whether two collections contain the different elements and throws an exception if the two collections contain identical elements without regard to order. |
AreNotEquivalent<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>, 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<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>, 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)
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
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);
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
expected
and actual
nullabilities don't match,
or if collections contain the same elements, including the same number of duplicate
occurrences of each element.
Applies to
AreNotEquivalent(ICollection, ICollection, String)
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
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);
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
expected
and actual
nullabilities don't match,
or if collections contain the same elements, including the same number of duplicate
occurrences of each element.
Applies to
AreNotEquivalent(ICollection, ICollection, String, Object[])
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
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);
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
expected
and actual
nullabilities don't match,
or if collections contain the same elements, including the same number of duplicate
occurrences of each element.
Applies to
AreNotEquivalent<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>)
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
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<T> (System.Collections.Generic.IEnumerable<T?>? expected, System.Collections.Generic.IEnumerable<T?>? actual, System.Collections.Generic.IEqualityComparer<T>? comparer);
static member AreNotEquivalent : seq<'T> * seq<'T> * System.Collections.Generic.IEqualityComparer<'T> -> unit
Public Shared Sub AreNotEquivalent(Of T) (expected As IEnumerable(Of T), actual As IEnumerable(Of T), comparer As IEqualityComparer(Of T))
Type Parameters
- T
The type of values to compare.
Parameters
- expected
- IEnumerable<T>
The first collection to compare. This contains the elements the test expects to be different than the actual collection.
- actual
- IEnumerable<T>
The second collection to compare. This is the collection produced by the code under test.
- comparer
- IEqualityComparer<T>
The compare implementation to use when comparing elements of the collection.
Exceptions
expected
and actual
nullabilities don't match,
or if collections contain the same elements, including the same number of duplicate
occurrences of each element.
Applies to
AreNotEquivalent<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>, String)
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
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<T> (System.Collections.Generic.IEnumerable<T?>? expected, System.Collections.Generic.IEnumerable<T?>? actual, System.Collections.Generic.IEqualityComparer<T>? comparer, string? message);
static member AreNotEquivalent : seq<'T> * seq<'T> * System.Collections.Generic.IEqualityComparer<'T> * string -> unit
Public Shared Sub AreNotEquivalent(Of T) (expected As IEnumerable(Of T), actual As IEnumerable(Of T), comparer As IEqualityComparer(Of T), message As String)
Type Parameters
- T
The type of values to compare.
Parameters
- expected
- IEnumerable<T>
The first collection to compare. This contains the elements the test expects to be different than the actual collection.
- actual
- IEnumerable<T>
The second collection to compare. This is the collection produced by the code under test.
- comparer
- IEqualityComparer<T>
The compare implementation to use when comparing elements of the collection.
- 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
expected
and actual
nullabilities don't match,
or if collections contain the same elements, including the same number of duplicate
occurrences of each element.
Applies to
AreNotEquivalent<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>, String, Object[])
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
- Source:
- CollectionAssert.cs
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<T> (System.Collections.Generic.IEnumerable<T?>? expected, System.Collections.Generic.IEnumerable<T?>? actual, System.Collections.Generic.IEqualityComparer<T>? comparer, string? message, params object?[]? parameters);
static member AreNotEquivalent : seq<'T> * seq<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * obj[] -> unit
Public Shared Sub AreNotEquivalent(Of T) (expected As IEnumerable(Of T), actual As IEnumerable(Of T), comparer As IEqualityComparer(Of T), message As String, ParamArray parameters As Object())
Type Parameters
- T
The type of values to compare.
Parameters
- expected
- IEnumerable<T>
The first collection to compare. This contains the elements the test expects to be different than the actual collection.
- actual
- IEnumerable<T>
The second collection to compare. This is the collection produced by the code under test.
- comparer
- IEqualityComparer<T>
The compare implementation to use when comparing elements of the collection.
- 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
expected
and actual
nullabilities don't match,
or if collections contain the same elements, including the same number of duplicate
occurrences of each element.