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
objectobjectThe object to be evaluated
Type Parameters
TThe 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
objectobjectThe object to be evaluated
exactMatchboolWill only fail with an exact type match when
trueis passed; will fail with a compatible type match whenfalseis passed.
Type Parameters
TThe 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
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
expectedTypeTypeThe type the object should not be
objectobjectThe object to be evaluated
exactMatchboolWill only fail with an exact type match when
trueis passed; will fail with a compatible type match whenfalseis passed.
Exceptions
Thrown when the object is the given type