Assert.AreSequenceEqual 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
| Name | Description |
|---|---|
| AreSequenceEqual(IEnumerable, IEnumerable, IEqualityComparer, SequenceOrder, String, String, String) |
Tests whether two sequences contain equal elements using the specified comparer and order semantics and throws an exception if they do not. |
| AreSequenceEqual(IEnumerable, IEnumerable, IEqualityComparer, String, String, String) |
Tests whether two sequences contain equal elements in the same order using the specified comparer and throws an exception if they do not. |
| AreSequenceEqual(IEnumerable, IEnumerable, String, String, String) |
Tests whether two sequences contain equal elements in the same order and throws an exception if they do not. |
| AreSequenceEqual(IEnumerable, IEnumerable, SequenceOrder, String, String, String) |
Tests whether two sequences contain equal elements using the specified order semantics and throws an exception if they do not. |
| AreSequenceEqual<T>(IEnumerable<T>, IEnumerable<T>, String, String, String) |
Tests whether two sequences contain equal elements in the same order and throws an exception if they do not. |
| AreSequenceEqual<T>(IEnumerable<T>, IEnumerable<T>, SequenceOrder, String, String, String) |
Tests whether two sequences contain equal elements using the specified order semantics and throws an exception if they do not. |
| AreSequenceEqual<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>, String, String, String) |
Tests whether two sequences contain equal elements in the same order using the specified comparer and throws an exception if they do not. |
| AreSequenceEqual<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>, SequenceOrder, String, String, String) |
Tests whether two sequences contain equal elements using the specified comparer and order semantics and throws an exception if they do not. |
AreSequenceEqual(IEnumerable, IEnumerable, IEqualityComparer, SequenceOrder, String, String, String)
- Source:
- Assert.AreSequenceEqual.cs
Tests whether two sequences contain equal elements using the specified comparer and order semantics and throws an exception if they do not.
public static void AreSequenceEqual(System.Collections.IEnumerable? expected, System.Collections.IEnumerable? actual, System.Collections.IEqualityComparer? comparer, Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder order, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : System.Collections.IEnumerable * System.Collections.IEnumerable * System.Collections.IEqualityComparer * Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder * string * string * string -> unit
Public Shared Sub AreSequenceEqual (expected As IEnumerable, actual As IEnumerable, comparer As IEqualityComparer, order As SequenceOrder, Optional message As String = "", Optional expectedExpression As String = "", Optional actualExpression As String = "")
Parameters
- expected
- IEnumerable
The sequence expected to be equal to actual.
- actual
- IEnumerable
The sequence produced by the code under test.
- comparer
- IEqualityComparer
The equality comparer to use when comparing elements, or null to use the default comparer.
- order
- SequenceOrder
Specifies whether elements must appear in the same order or in any order.
- message
- String
The message to include in the exception when the sequences are not equal.
- expectedExpression
- String
The syntactic expression of expected as given by the compiler via caller argument expression.
- actualExpression
- String
The syntactic expression of actual as given by the compiler via caller argument expression.
Applies to
AreSequenceEqual(IEnumerable, IEnumerable, IEqualityComparer, String, String, String)
- Source:
- Assert.AreSequenceEqual.cs
Tests whether two sequences contain equal elements in the same order using the specified comparer and throws an exception if they do not.
public static void AreSequenceEqual(System.Collections.IEnumerable? expected, System.Collections.IEnumerable? actual, System.Collections.IEqualityComparer? comparer, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : System.Collections.IEnumerable * System.Collections.IEnumerable * System.Collections.IEqualityComparer * string * string * string -> unit
Public Shared Sub AreSequenceEqual (expected As IEnumerable, actual As IEnumerable, comparer As IEqualityComparer, Optional message As String = "", Optional expectedExpression As String = "", Optional actualExpression As String = "")
Parameters
- expected
- IEnumerable
The sequence expected to be equal to actual.
- actual
- IEnumerable
The sequence produced by the code under test.
- comparer
- IEqualityComparer
The equality comparer to use when comparing elements, or null to use the default comparer.
- message
- String
The message to include in the exception when the sequences are not equal.
- expectedExpression
- String
The syntactic expression of expected as given by the compiler via caller argument expression.
- actualExpression
- String
The syntactic expression of actual as given by the compiler via caller argument expression.
Applies to
AreSequenceEqual(IEnumerable, IEnumerable, String, String, String)
- Source:
- Assert.AreSequenceEqual.cs
Tests whether two sequences contain equal elements in the same order and throws an exception if they do not.
public static void AreSequenceEqual(System.Collections.IEnumerable? expected, System.Collections.IEnumerable? actual, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : System.Collections.IEnumerable * System.Collections.IEnumerable * string * string * string -> unit
Public Shared Sub AreSequenceEqual (expected As IEnumerable, actual As IEnumerable, Optional message As String = "", Optional expectedExpression As String = "", Optional actualExpression As String = "")
Parameters
- expected
- IEnumerable
The sequence expected to be equal to actual.
- actual
- IEnumerable
The sequence produced by the code under test.
- message
- String
The message to include in the exception when the sequences are not equal.
- expectedExpression
- String
The syntactic expression of expected as given by the compiler via caller argument expression.
- actualExpression
- String
The syntactic expression of actual as given by the compiler via caller argument expression.
Applies to
AreSequenceEqual(IEnumerable, IEnumerable, SequenceOrder, String, String, String)
- Source:
- Assert.AreSequenceEqual.cs
Tests whether two sequences contain equal elements using the specified order semantics and throws an exception if they do not.
public static void AreSequenceEqual(System.Collections.IEnumerable? expected, System.Collections.IEnumerable? actual, Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder order, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : System.Collections.IEnumerable * System.Collections.IEnumerable * Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder * string * string * string -> unit
Public Shared Sub AreSequenceEqual (expected As IEnumerable, actual As IEnumerable, order As SequenceOrder, Optional message As String = "", Optional expectedExpression As String = "", Optional actualExpression As String = "")
Parameters
- expected
- IEnumerable
The sequence expected to be equal to actual.
- actual
- IEnumerable
The sequence produced by the code under test.
- order
- SequenceOrder
Specifies whether elements must appear in the same order or in any order.
- message
- String
The message to include in the exception when the sequences are not equal.
- expectedExpression
- String
The syntactic expression of expected as given by the compiler via caller argument expression.
- actualExpression
- String
The syntactic expression of actual as given by the compiler via caller argument expression.
Applies to
AreSequenceEqual<T>(IEnumerable<T>, IEnumerable<T>, String, String, String)
- Source:
- Assert.AreSequenceEqual.cs
Tests whether two sequences contain equal elements in the same order and throws an exception if they do not.
public static void AreSequenceEqual<T>(System.Collections.Generic.IEnumerable<T>? expected, System.Collections.Generic.IEnumerable<T>? actual, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : seq<'T> * seq<'T> * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As IEnumerable(Of T), actual As IEnumerable(Of T), Optional message As String = "", Optional expectedExpression As String = "", Optional actualExpression As String = "")
Type Parameters
- T
The type of sequence elements.
Parameters
- expected
- IEnumerable<T>
The sequence expected to be equal to actual.
- actual
- IEnumerable<T>
The sequence produced by the code under test.
- message
- String
The message to include in the exception when the sequences are not equal.
- expectedExpression
- String
The syntactic expression of expected as given by the compiler via caller argument expression.
- actualExpression
- String
The syntactic expression of actual as given by the compiler via caller argument expression.
Applies to
AreSequenceEqual<T>(IEnumerable<T>, IEnumerable<T>, SequenceOrder, String, String, String)
- Source:
- Assert.AreSequenceEqual.cs
Tests whether two sequences contain equal elements using the specified order semantics and throws an exception if they do not.
public static void AreSequenceEqual<T>(System.Collections.Generic.IEnumerable<T>? expected, System.Collections.Generic.IEnumerable<T>? actual, Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder order, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : seq<'T> * seq<'T> * Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As IEnumerable(Of T), actual As IEnumerable(Of T), order As SequenceOrder, Optional message As String = "", Optional expectedExpression As String = "", Optional actualExpression As String = "")
Type Parameters
- T
The type of sequence elements.
Parameters
- expected
- IEnumerable<T>
The sequence expected to be equal to actual.
- actual
- IEnumerable<T>
The sequence produced by the code under test.
- order
- SequenceOrder
Specifies whether elements must appear in the same order or in any order.
- message
- String
The message to include in the exception when the sequences are not equal.
- expectedExpression
- String
The syntactic expression of expected as given by the compiler via caller argument expression.
- actualExpression
- String
The syntactic expression of actual as given by the compiler via caller argument expression.
Applies to
AreSequenceEqual<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>, String, String, String)
- Source:
- Assert.AreSequenceEqual.cs
Tests whether two sequences contain equal elements in the same order using the specified comparer and throws an exception if they do not.
public static void AreSequenceEqual<T>(System.Collections.Generic.IEnumerable<T>? expected, System.Collections.Generic.IEnumerable<T>? actual, System.Collections.Generic.IEqualityComparer<T>? comparer, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : seq<'T> * seq<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As IEnumerable(Of T), actual As IEnumerable(Of T), comparer As IEqualityComparer(Of T), Optional message As String = "", Optional expectedExpression As String = "", Optional actualExpression As String = "")
Type Parameters
- T
The type of sequence elements.
Parameters
- expected
- IEnumerable<T>
The sequence expected to be equal to actual.
- actual
- IEnumerable<T>
The sequence produced by the code under test.
- comparer
- IEqualityComparer<T>
The equality comparer to use when comparing elements, or null to use the default comparer.
- message
- String
The message to include in the exception when the sequences are not equal.
- expectedExpression
- String
The syntactic expression of expected as given by the compiler via caller argument expression.
- actualExpression
- String
The syntactic expression of actual as given by the compiler via caller argument expression.
Applies to
AreSequenceEqual<T>(IEnumerable<T>, IEnumerable<T>, IEqualityComparer<T>, SequenceOrder, String, String, String)
- Source:
- Assert.AreSequenceEqual.cs
Tests whether two sequences contain equal elements using the specified comparer and order semantics and throws an exception if they do not.
public static void AreSequenceEqual<T>(System.Collections.Generic.IEnumerable<T>? expected, System.Collections.Generic.IEnumerable<T>? actual, System.Collections.Generic.IEqualityComparer<T>? comparer, Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder order, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : seq<'T> * seq<'T> * System.Collections.Generic.IEqualityComparer<'T> * Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As IEnumerable(Of T), actual As IEnumerable(Of T), comparer As IEqualityComparer(Of T), order As SequenceOrder, Optional message As String = "", Optional expectedExpression As String = "", Optional actualExpression As String = "")
Type Parameters
- T
The type of sequence elements.
Parameters
- expected
- IEnumerable<T>
The sequence expected to be equal to actual.
- actual
- IEnumerable<T>
The sequence produced by the code under test.
- comparer
- IEqualityComparer<T>
The equality comparer to use when comparing elements, or null to use the default comparer.
- order
- SequenceOrder
Specifies whether elements must appear in the same order or in any order.
- message
- String
The message to include in the exception when the sequences are not equal.
- expectedExpression
- String
The syntactic expression of expected as given by the compiler via caller argument expression.
- actualExpression
- String
The syntactic expression of actual as given by the compiler via caller argument expression.