Class DoesNotContainException
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
indexFailurePointintThe item index for where the item was found
failurePointerIndentint?The number of spaces needed to indent the failure pointer
collectionstringThe collection
Returns
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
itemstringThe item that was found in the collection
indexFailurePointintThe item index for where the item was found
failurePointerIndentint?The number of spaces needed to indent the failure pointer
collectionstringThe collection
Returns
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
Returns
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
Returns
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
expectedSubMemorystringThe expected sub-memory
indexFailurePointintThe item index for where the item was found
failurePointerIndentint?The number of spaces needed to indent the failure pointer
memorystringThe memory
Returns
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
expectedSubSpanstringThe expected sub-span
indexFailurePointintThe item index for where the item was found
failurePointerIndentint?The number of spaces needed to indent the failure pointer
spanstringThe span
Returns
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
expectedSubStringstringThe expected sub-string
indexFailurePointintThe item index for where the item was found
stringstringThe string