Table of Contents

Class DoesNotContainException

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

Exception thrown when Assert.DoesNotContain fails.

public class DoesNotContainException : XunitException, ISerializable, IAssertionException
Inheritance
DoesNotContainException
Implements
Inherited Members

Methods

ForCollectionFilterMatched(int, int?, string)

Creates a new instance of the DoesNotContainException class to be thrown when the requested filter matches an item in the collection.

public static DoesNotContainException ForCollectionFilterMatched(int indexFailurePoint, int? failurePointerIndent, string collection)

Parameters

indexFailurePoint int

The item index for where the item was found

failurePointerIndent int?

The number of spaces needed to indent the failure pointer

collection string

The collection

Returns

DoesNotContainException

ForCollectionItemFound(string, int, int?, string)

Creates a new instance of the DoesNotContainException class to be thrown when the requested item was found in the collection.

public static DoesNotContainException ForCollectionItemFound(string item, int indexFailurePoint, int? failurePointerIndent, string collection)

Parameters

item string

The item that was found in the collection

indexFailurePoint int

The item index for where the item was found

failurePointerIndent int?

The number of spaces needed to indent the failure pointer

collection string

The collection

Returns

DoesNotContainException

ForKeyFound(string, string)

Creates a new instance of the DoesNotContainException class to be thrown when the requested key was found in the dictionary.

public static DoesNotContainException ForKeyFound(string expectedKey, string keys)

Parameters

expectedKey string

The expected key value

keys string

The dictionary keys

Returns

DoesNotContainException

ForSetItemFound(string, string)

Creates a new instance of the DoesNotContainException class to be thrown when the requested item was found in the set.

public static DoesNotContainException ForSetItemFound(string item, string set)

Parameters

item string

The item that was found in the collection

set string

The set

Returns

DoesNotContainException

ForSubMemoryFound(string, int, int?, string)

Creates a new instance of the DoesNotContainException class to be thrown when the requested sub-memory was found in the memory.

public static DoesNotContainException ForSubMemoryFound(string expectedSubMemory, int indexFailurePoint, int? failurePointerIndent, string memory)

Parameters

expectedSubMemory string

The expected sub-memory

indexFailurePoint int

The item index for where the item was found

failurePointerIndent int?

The number of spaces needed to indent the failure pointer

memory string

The memory

Returns

DoesNotContainException

ForSubSpanFound(string, int, int?, string)

Creates a new instance of the DoesNotContainException class to be thrown when the requested sub-span was found in the span.

public static DoesNotContainException ForSubSpanFound(string expectedSubSpan, int indexFailurePoint, int? failurePointerIndent, string span)

Parameters

expectedSubSpan string

The expected sub-span

indexFailurePoint int

The item index for where the item was found

failurePointerIndent int?

The number of spaces needed to indent the failure pointer

span string

The span

Returns

DoesNotContainException

ForSubStringFound(string, int, string)

Creates a new instance of the DoesNotContainException class to be thrown when the requested sub-string was found in the string.

public static DoesNotContainException ForSubStringFound(string expectedSubString, int indexFailurePoint, string @string)

Parameters

expectedSubString string

The expected sub-string

indexFailurePoint int

The item index for where the item was found

string string

The string

Returns

DoesNotContainException