Class CollectionException
Exception thrown when Assert.Collection fails.
public class CollectionException : XunitException, ISerializable, IAssertionException
- Inheritance
-
CollectionException
- Implements
- Inherited Members
Methods
ForMismatchedItem(Exception, int, int?, string)
Creates an instance of the CollectionException class to be thrown when an item comparison failed
public static CollectionException ForMismatchedItem(Exception exception, int indexFailurePoint, int? failurePointerIndent, string formattedCollection)
Parameters
exceptionExceptionThe exception that was thrown
indexFailurePointintThe item index for the failed item
failurePointerIndentint?The number of spaces needed to indent the failure pointer
formattedCollectionstringThe formatted collection
Returns
ForMismatchedItemCount(int, int, string)
Creates an instance of the CollectionException class to be thrown when the item count in a collection does not match the expected count.
public static CollectionException ForMismatchedItemCount(int expectedCount, int actualCount, string formattedCollection)
Parameters
expectedCountintThe expected item count
actualCountintThe actual item count
formattedCollectionstringThe formatted collection