Table of Contents

Method ForIncorrectExceptionType

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

ForIncorrectExceptionType(Type, Exception)

Creates a new instance of the ThrowsAnyException class to be thrown when an exception of the wrong type was thrown by Assert.ThrowsAny.

public static ThrowsAnyException ForIncorrectExceptionType(Type expected, Exception actual)

Parameters

expected Type

The expected exception type

actual Exception

The actual exception

Returns