Table of Contents

Method IsNotType

Namespace
Xunit
Assembly
xunit.v3.assert.dll

IsNotType<T>(object?)

Verifies that an object is not exactly the given type.

public static void IsNotType<T>(object? @object)

Parameters

object object

The object to be evaluated

Type Parameters

T

The type the object should not be

Exceptions

Thrown when the object is the given type

IsNotType<T>(object?, bool)

Verifies that an object is not of the given type.

public static void IsNotType<T>(object? @object, bool exactMatch)

Parameters

object object

The object to be evaluated

exactMatch bool

Will only fail with an exact type match when true is passed; will fail with a compatible type match when false is passed.

Type Parameters

T

The type the object should not be

Exceptions

Thrown when the object is the given type

IsNotType(Type, object?)

Verifies that an object is not exactly the given type.

public static void IsNotType(Type expectedType, object? @object)

Parameters

expectedType Type

The type the object should not be

object object

The object to be evaluated

Exceptions

Thrown when the object is the given type

IsNotType(Type, object?, bool)

Verifies that an object is not of the given type.

public static void IsNotType(Type expectedType, object? @object, bool exactMatch)

Parameters

expectedType Type

The type the object should not be

object object

The object to be evaluated

exactMatch bool

Will only fail with an exact type match when true is passed; will fail with a compatible type match when false is passed.

Exceptions

Thrown when the object is the given type