Class ContainsException
Exception thrown when Assert.Contains fails.
public class ContainsException : XunitException, ISerializable, IAssertionException
- Inheritance
-
ContainsException
- Implements
- Inherited Members
Methods
ForCollectionFilterNotMatched(string)
Creates a new instance of the ContainsException class to be thrown when the requested filter did not match any items in the collection.
public static ContainsException ForCollectionFilterNotMatched(string collection)
Parameters
collectionstringThe collection
Returns
ForCollectionItemNotFound(string, string)
Creates a new instance of the ContainsException class to be thrown when the requested item was not available in the collection.
public static ContainsException ForCollectionItemNotFound(string item, string collection)
Parameters
Returns
ForKeyNotFound(string, string)
Creates a new instance of the ContainsException class to be thrown when the requested key was not available in the dictionary.
public static ContainsException ForKeyNotFound(string expectedKey, string keys)
Parameters
Returns
ForSetItemNotFound(string, string)
Creates a new instance of the ContainsException class to be thrown when the requested item was not found in the set.
public static ContainsException ForSetItemNotFound(string item, string set)
Parameters
Returns
ForSubMemoryNotFound(string, string)
Creates a new instance of the ContainsException class to be thrown when the requested sub-memory was not found in the memory.
public static ContainsException ForSubMemoryNotFound(string expectedSubMemory, string memory)
Parameters
Returns
ForSubSpanNotFound(string, string)
Creates a new instance of the ContainsException class to be thrown when the requested sub-span was not found in the span.
public static ContainsException ForSubSpanNotFound(string expectedSubSpan, string span)
Parameters
Returns
ForSubStringNotFound(string, string?)
Creates a new instance of the ContainsException class to be thrown when the requested sub-string was not found in the string.
public static ContainsException ForSubStringNotFound(string expectedSubString, string? @string)