Table of Contents

Method ForMismatchedTypes

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

ForMismatchedTypes(Type, Type, string)

Creates a new instance of EquivalentException which shows a message that indicates that expectedType does not match actualType. This is typically only used in special case comparison where it would be known that general comparison would fail for other reasons, like two objects derived from FileSystemInfo with different concrete types.

public static EquivalentException ForMismatchedTypes(Type expectedType, Type actualType, string memberName)

Parameters

expectedType Type

The expected type

actualType Type

The actual type

memberName string

The name of the member that was being inspected (may be an empty string for a top-level comparison)

Returns