Table of Contents

Method ForEqualCollectionsWithError

Namespace
Xunit.Sdk
Assembly
xunit.v3.assert.dll

ForEqualCollectionsWithError(int?, string, int?, string, int?, Exception?, string?)

Creates a new instance of NotEqualException to be thrown when two collections are equal, and an error has occurred during comparison.

public static NotEqualException ForEqualCollectionsWithError(int? mismatchedIndex, string expected, int? expectedPointer, string actual, int? actualPointer, Exception? error = null, string? collectionDisplay = null)

Parameters

mismatchedIndex int?

The index at which the collections error occurred (should be null when error is null)

expected string

The expected collection

expectedPointer int?

The spacing into the expected collection where the difference occurs (should be null when error is null)

actual string

The actual collection

actualPointer int?

The spacing into the actual collection where the difference occurs (should be null when error is null)

error Exception

The optional exception that was thrown during comparison

collectionDisplay string

The display name for the collection type (defaults to "Collections")

Returns