Language

Assert.AreSequenceEqual Method

Definition

Overloads

Name Description
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(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, 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<T>(Span<T>, Span<T>, IEqualityComparer<T>, SequenceOrder, String, String, String)

Tests whether two spans contain equal elements using the specified comparer and order semantics and throws an exception if they do not.

AreSequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, IEqualityComparer<T>, SequenceOrder, String, String, String)

Tests whether two spans contain equal elements using the specified comparer and order semantics and throws an exception if they do not.

AreSequenceEqual<T>(ReadOnlyMemory<T>, ReadOnlyMemory<T>, IEqualityComparer<T>, SequenceOrder, String, String, String)

Tests whether two memory regions contain equal elements using the specified comparer and order semantics and throws an exception if they do not.

AreSequenceEqual<T>(Memory<T>, Memory<T>, IEqualityComparer<T>, SequenceOrder, String, String, String)

Tests whether two memory regions contain equal elements using the specified comparer and order semantics 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<T>(Span<T>, Span<T>, IEqualityComparer<T>, String, String, String)

Tests whether two spans contain equal elements in the same order using the specified comparer and throws an exception if they do not.

AreSequenceEqual<T>(Span<T>, Span<T>, SequenceOrder, String, String, String)

Tests whether two spans contain equal elements using the specified order semantics and throws an exception if they do not.

AreSequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, IEqualityComparer<T>, String, String, String)

Tests whether two spans contain equal elements in the same order using the specified comparer and throws an exception if they do not.

AreSequenceEqual<T>(ReadOnlyMemory<T>, ReadOnlyMemory<T>, IEqualityComparer<T>, String, String, String)

Tests whether two memory regions contain equal elements in the same order using the specified comparer and throws an exception if they do not.

AreSequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, SequenceOrder, String, String, String)

Tests whether two spans contain equal elements using the specified order semantics and throws an exception if they do not.

AreSequenceEqual<T>(Memory<T>, Memory<T>, IEqualityComparer<T>, String, String, String)

Tests whether two memory regions contain equal elements in the same order using the specified comparer and throws an exception if they do not.

AreSequenceEqual<T>(ReadOnlyMemory<T>, ReadOnlyMemory<T>, SequenceOrder, String, String, String)

Tests whether two memory regions contain equal elements using the specified order semantics and throws an exception if they do not.

AreSequenceEqual<T>(Memory<T>, Memory<T>, String, String, String)

Tests whether two memory regions contain equal elements in the same order and throws an exception if they do not.

AreSequenceEqual<T>(ReadOnlyMemory<T>, ReadOnlyMemory<T>, String, String, String)

Tests whether two memory regions contain equal elements in the same order and throws an exception if they do not.

AreSequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, String, String, String)

Tests whether two spans contain equal elements in the same order 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>(Memory<T>, Memory<T>, SequenceOrder, String, String, String)

Tests whether two memory regions contain equal elements using the specified order semantics and throws an exception if they do not.

AreSequenceEqual<T>(Span<T>, Span<T>, String, String, String)

Tests whether two spans contain equal elements in the same order and throws an exception if they do not.

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(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, 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<T>(Span<T>, Span<T>, IEqualityComparer<T>, SequenceOrder, String, String, String)

Tests whether two spans contain equal elements using the specified comparer and order semantics and throws an exception if they do not.

public static void AreSequenceEqual<T>(Span<T> expected, Span<T> actual, System.Collections.Generic.IEqualityComparer<T>? comparer, Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder order, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : Span<'T> * Span<'T> * System.Collections.Generic.IEqualityComparer<'T> * Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As Span(Of T), actual As Span(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
Span<T>

The span expected to be equal to actual.

actual
Span<T>

The span 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.

Applies to

AreSequenceEqual<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, IEqualityComparer<T>, SequenceOrder, String, String, String)

Tests whether two spans contain equal elements using the specified comparer and order semantics and throws an exception if they do not.

public static void AreSequenceEqual<T>(ReadOnlySpan<T> expected, ReadOnlySpan<T> actual, System.Collections.Generic.IEqualityComparer<T>? comparer, Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder order, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : ReadOnlySpan<'T> * ReadOnlySpan<'T> * System.Collections.Generic.IEqualityComparer<'T> * Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As ReadOnlySpan(Of T), actual As ReadOnlySpan(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
ReadOnlySpan<T>

The span expected to be equal to actual.

actual
ReadOnlySpan<T>

The span 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.

Applies to

AreSequenceEqual<T>(ReadOnlyMemory<T>, ReadOnlyMemory<T>, IEqualityComparer<T>, SequenceOrder, String, String, String)

Tests whether two memory regions contain equal elements using the specified comparer and order semantics and throws an exception if they do not.

public static void AreSequenceEqual<T>(ReadOnlyMemory<T> expected, ReadOnlyMemory<T> actual, System.Collections.Generic.IEqualityComparer<T>? comparer, Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder order, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : ReadOnlyMemory<'T> * ReadOnlyMemory<'T> * System.Collections.Generic.IEqualityComparer<'T> * Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As ReadOnlyMemory(Of T), actual As ReadOnlyMemory(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
ReadOnlyMemory<T>

The memory expected to be equal to actual.

actual
ReadOnlyMemory<T>

The memory 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.

Applies to

AreSequenceEqual<T>(Memory<T>, Memory<T>, IEqualityComparer<T>, SequenceOrder, String, String, String)

Tests whether two memory regions contain equal elements using the specified comparer and order semantics and throws an exception if they do not.

public static void AreSequenceEqual<T>(Memory<T> expected, Memory<T> actual, System.Collections.Generic.IEqualityComparer<T>? comparer, Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder order, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : Memory<'T> * Memory<'T> * System.Collections.Generic.IEqualityComparer<'T> * Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As Memory(Of T), actual As Memory(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
Memory<T>

The memory expected to be equal to actual.

actual
Memory<T>

The memory 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.

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.

Applies to

AreSequenceEqual<T>(Span<T>, Span<T>, IEqualityComparer<T>, String, String, String)

Tests whether two spans contain equal elements in the same order using the specified comparer and throws an exception if they do not.

public static void AreSequenceEqual<T>(Span<T> expected, Span<T> actual, System.Collections.Generic.IEqualityComparer<T>? comparer, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : Span<'T> * Span<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As Span(Of T), actual As Span(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
Span<T>

The span expected to be equal to actual.

actual
Span<T>

The span 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>(Span<T>, Span<T>, SequenceOrder, String, String, String)

Tests whether two spans contain equal elements using the specified order semantics and throws an exception if they do not.

public static void AreSequenceEqual<T>(Span<T> expected, Span<T> actual, Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder order, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : Span<'T> * Span<'T> * Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As Span(Of T), actual As Span(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
Span<T>

The span expected to be equal to actual.

actual
Span<T>

The span 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>(ReadOnlySpan<T>, ReadOnlySpan<T>, IEqualityComparer<T>, String, String, String)

Tests whether two spans contain equal elements in the same order using the specified comparer and throws an exception if they do not.

public static void AreSequenceEqual<T>(ReadOnlySpan<T> expected, ReadOnlySpan<T> actual, System.Collections.Generic.IEqualityComparer<T>? comparer, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : ReadOnlySpan<'T> * ReadOnlySpan<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As ReadOnlySpan(Of T), actual As ReadOnlySpan(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
ReadOnlySpan<T>

The span expected to be equal to actual.

actual
ReadOnlySpan<T>

The span 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>(ReadOnlyMemory<T>, ReadOnlyMemory<T>, IEqualityComparer<T>, String, String, String)

Tests whether two memory regions contain equal elements in the same order using the specified comparer and throws an exception if they do not.

public static void AreSequenceEqual<T>(ReadOnlyMemory<T> expected, ReadOnlyMemory<T> actual, System.Collections.Generic.IEqualityComparer<T>? comparer, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : ReadOnlyMemory<'T> * ReadOnlyMemory<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As ReadOnlyMemory(Of T), actual As ReadOnlyMemory(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
ReadOnlyMemory<T>

The memory expected to be equal to actual.

actual
ReadOnlyMemory<T>

The memory 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>(ReadOnlySpan<T>, ReadOnlySpan<T>, SequenceOrder, String, String, String)

Tests whether two spans contain equal elements using the specified order semantics and throws an exception if they do not.

public static void AreSequenceEqual<T>(ReadOnlySpan<T> expected, ReadOnlySpan<T> actual, Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder order, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : ReadOnlySpan<'T> * ReadOnlySpan<'T> * Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As ReadOnlySpan(Of T), actual As ReadOnlySpan(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
ReadOnlySpan<T>

The span expected to be equal to actual.

actual
ReadOnlySpan<T>

The span 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>(Memory<T>, Memory<T>, IEqualityComparer<T>, String, String, String)

Tests whether two memory regions contain equal elements in the same order using the specified comparer and throws an exception if they do not.

public static void AreSequenceEqual<T>(Memory<T> expected, Memory<T> actual, System.Collections.Generic.IEqualityComparer<T>? comparer, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : Memory<'T> * Memory<'T> * System.Collections.Generic.IEqualityComparer<'T> * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As Memory(Of T), actual As Memory(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
Memory<T>

The memory expected to be equal to actual.

actual
Memory<T>

The memory 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>(ReadOnlyMemory<T>, ReadOnlyMemory<T>, SequenceOrder, String, String, String)

Tests whether two memory regions contain equal elements using the specified order semantics and throws an exception if they do not.

public static void AreSequenceEqual<T>(ReadOnlyMemory<T> expected, ReadOnlyMemory<T> actual, Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder order, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : ReadOnlyMemory<'T> * ReadOnlyMemory<'T> * Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As ReadOnlyMemory(Of T), actual As ReadOnlyMemory(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
ReadOnlyMemory<T>

The memory expected to be equal to actual.

actual
ReadOnlyMemory<T>

The memory 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>(Memory<T>, Memory<T>, String, String, String)

Tests whether two memory regions contain equal elements in the same order and throws an exception if they do not.

public static void AreSequenceEqual<T>(Memory<T> expected, Memory<T> actual, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : Memory<'T> * Memory<'T> * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As Memory(Of T), actual As Memory(Of T), Optional message As String = "", Optional expectedExpression As String = "", Optional actualExpression As String = "")

Type Parameters

T

The type of sequence elements.

Parameters

expected
Memory<T>

The memory expected to be equal to actual.

actual
Memory<T>

The memory 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>(ReadOnlyMemory<T>, ReadOnlyMemory<T>, String, String, String)

Tests whether two memory regions contain equal elements in the same order and throws an exception if they do not.

public static void AreSequenceEqual<T>(ReadOnlyMemory<T> expected, ReadOnlyMemory<T> actual, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : ReadOnlyMemory<'T> * ReadOnlyMemory<'T> * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As ReadOnlyMemory(Of T), actual As ReadOnlyMemory(Of T), Optional message As String = "", Optional expectedExpression As String = "", Optional actualExpression As String = "")

Type Parameters

T

The type of sequence elements.

Parameters

expected
ReadOnlyMemory<T>

The memory expected to be equal to actual.

actual
ReadOnlyMemory<T>

The memory 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>(ReadOnlySpan<T>, ReadOnlySpan<T>, String, String, String)

Tests whether two spans contain equal elements in the same order and throws an exception if they do not.

public static void AreSequenceEqual<T>(ReadOnlySpan<T> expected, ReadOnlySpan<T> actual, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : ReadOnlySpan<'T> * ReadOnlySpan<'T> * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As ReadOnlySpan(Of T), actual As ReadOnlySpan(Of T), Optional message As String = "", Optional expectedExpression As String = "", Optional actualExpression As String = "")

Type Parameters

T

The type of sequence elements.

Parameters

expected
ReadOnlySpan<T>

The span expected to be equal to actual.

actual
ReadOnlySpan<T>

The span 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>, 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>(Memory<T>, Memory<T>, SequenceOrder, String, String, String)

Tests whether two memory regions contain equal elements using the specified order semantics and throws an exception if they do not.

public static void AreSequenceEqual<T>(Memory<T> expected, Memory<T> actual, Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder order, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : Memory<'T> * Memory<'T> * Microsoft.VisualStudio.TestTools.UnitTesting.SequenceOrder * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As Memory(Of T), actual As Memory(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
Memory<T>

The memory expected to be equal to actual.

actual
Memory<T>

The memory 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>(Span<T>, Span<T>, String, String, String)

Tests whether two spans contain equal elements in the same order and throws an exception if they do not.

public static void AreSequenceEqual<T>(Span<T> expected, Span<T> actual, string? message = "", string expectedExpression = "", string actualExpression = "");
static member AreSequenceEqual : Span<'T> * Span<'T> * string * string * string -> unit
Public Shared Sub AreSequenceEqual(Of T) (expected As Span(Of T), actual As Span(Of T), Optional message As String = "", Optional expectedExpression As String = "", Optional actualExpression As String = "")

Type Parameters

T

The type of sequence elements.

Parameters

expected
Span<T>

The span expected to be equal to actual.

actual
Span<T>

The span 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