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(Span, Span, IEqualityComparer, 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(ReadOnlySpan, ReadOnlySpan, IEqualityComparer, 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(ReadOnlyMemory, ReadOnlyMemory, IEqualityComparer, 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(Memory, Memory, IEqualityComparer, 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(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(Span, Span, IEqualityComparer, 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(Span, Span, 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(ReadOnlySpan, ReadOnlySpan, IEqualityComparer, 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(ReadOnlyMemory, ReadOnlyMemory, IEqualityComparer, 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(ReadOnlySpan, ReadOnlySpan, 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(Memory, Memory, IEqualityComparer, 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(ReadOnlyMemory, ReadOnlyMemory, 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(Memory, Memory, String, String, String)

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

AreSequenceEqual(ReadOnlyMemory, ReadOnlyMemory, String, String, String)

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

AreSequenceEqual(ReadOnlySpan, ReadOnlySpan, 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)

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(Memory, Memory, 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(Span, Span, 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(Span, Span, IEqualityComparer, 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(Span expected, Span actual, System.Collections.Generic.IEqualityComparer? 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

The span expected to be equal to actual.

actual
Span

The span 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(ReadOnlySpan, ReadOnlySpan, IEqualityComparer, 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(ReadOnlySpan expected, ReadOnlySpan actual, System.Collections.Generic.IEqualityComparer? 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

The span expected to be equal to actual.

actual
ReadOnlySpan

The span 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(ReadOnlyMemory, ReadOnlyMemory, IEqualityComparer, 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(ReadOnlyMemory expected, ReadOnlyMemory actual, System.Collections.Generic.IEqualityComparer? 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

The memory expected to be equal to actual.

actual
ReadOnlyMemory

The memory 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(Memory, Memory, IEqualityComparer, 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(Memory expected, Memory actual, System.Collections.Generic.IEqualityComparer? 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

The memory expected to be equal to actual.

actual
Memory

The memory 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, 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.Generic.IEnumerable? expected, System.Collections.Generic.IEnumerable? actual, System.Collections.Generic.IEqualityComparer? 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

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(Span, Span, IEqualityComparer, 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(Span expected, Span actual, System.Collections.Generic.IEqualityComparer? 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

The span expected to be equal to actual.

actual
Span

The span 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(Span, Span, 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(Span expected, Span 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

The span expected to be equal to actual.

actual
Span

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(ReadOnlySpan, ReadOnlySpan, IEqualityComparer, 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(ReadOnlySpan expected, ReadOnlySpan actual, System.Collections.Generic.IEqualityComparer? 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

The span expected to be equal to actual.

actual
ReadOnlySpan

The span 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(ReadOnlyMemory, ReadOnlyMemory, IEqualityComparer, 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(ReadOnlyMemory expected, ReadOnlyMemory actual, System.Collections.Generic.IEqualityComparer? 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

The memory expected to be equal to actual.

actual
ReadOnlyMemory

The memory 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(ReadOnlySpan, ReadOnlySpan, 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(ReadOnlySpan expected, ReadOnlySpan 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

The span expected to be equal to actual.

actual
ReadOnlySpan

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(Memory, Memory, IEqualityComparer, 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(Memory expected, Memory actual, System.Collections.Generic.IEqualityComparer? 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

The memory expected to be equal to actual.

actual
Memory

The memory 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(ReadOnlyMemory, ReadOnlyMemory, 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(ReadOnlyMemory expected, ReadOnlyMemory 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

The memory expected to be equal to actual.

actual
ReadOnlyMemory

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(Memory, Memory, 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(Memory expected, Memory 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

The memory expected to be equal to actual.

actual
Memory

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(ReadOnlyMemory, ReadOnlyMemory, 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(ReadOnlyMemory expected, ReadOnlyMemory 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

The memory expected to be equal to actual.

actual
ReadOnlyMemory

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(ReadOnlySpan, ReadOnlySpan, 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(ReadOnlySpan expected, ReadOnlySpan 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

The span expected to be equal to actual.

actual
ReadOnlySpan

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(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.Generic.IEnumerable? expected, System.Collections.Generic.IEnumerable? 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

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.Generic.IEnumerable? expected, System.Collections.Generic.IEnumerable? 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

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.Generic.IEnumerable? expected, System.Collections.Generic.IEnumerable? actual, System.Collections.Generic.IEqualityComparer? 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

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(Memory, Memory, 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(Memory expected, Memory 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

The memory expected to be equal to actual.

actual
Memory

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(Span, Span, 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(Span expected, Span 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

The span expected to be equal to actual.

actual
Span

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