Table of Contents

Class IsTypeException

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

Exception thrown when Assert.IsType fails.

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

Methods

ForIncompatibleType(string, string?)

Creates a new instance of the IsTypeException class to be thrown when an object was not compatible with the given type

public static IsTypeException ForIncompatibleType(string expectedTypeName, string? actualTypeName)

Parameters

expectedTypeName string

The expected type name

actualTypeName string

The actual type name

Returns

IsTypeException

ForMismatchedType(string, string?)

Creates a new instance of the IsTypeException class to be thrown when an object did not exactly match the given type

public static IsTypeException ForMismatchedType(string expectedTypeName, string? actualTypeName)

Parameters

expectedTypeName string

The expected type name

actualTypeName string

The actual type name

Returns

IsTypeException