Assert.IsNotExactInstanceOfType Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| IsNotExactInstanceOfType(Object, Type, Assert+AssertIsNotExactInstanceOfTypeInterpolatedStringHandler, String) |
Tests whether the specified object is not exactly an instance of the wrong type and throws an exception if the specified type matches exactly. |
| IsNotExactInstanceOfType(Object, Type, String, String) |
Tests whether the specified object is not exactly an instance of the wrong type and throws an exception if the specified type matches exactly. |
| IsNotExactInstanceOfType<T>(Object, Assert.AssertGenericIsNotExactInstanceOfTypeInterpolatedStringHandler<T>, String) |
Tests whether the specified object is not exactly an instance of the wrong generic type and throws an exception if the specified type matches exactly. |
| IsNotExactInstanceOfType<T>(Object, String, String) |
Tests whether the specified object is not exactly an instance of the wrong generic type and throws an exception if the specified type matches exactly. |
IsNotExactInstanceOfType(Object, Type, Assert+AssertIsNotExactInstanceOfTypeInterpolatedStringHandler, String)
Tests whether the specified object is not exactly an instance of the wrong type and throws an exception if the specified type matches exactly.
public static void IsNotExactInstanceOfType(object? value, Type? wrongType, ref Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertIsNotExactInstanceOfTypeInterpolatedStringHandler message, string valueExpression = "");
static member IsNotExactInstanceOfType : obj * Type * AssertIsNotExactInstanceOfTypeInterpolatedStringHandler * string -> unit
Public Shared Sub IsNotExactInstanceOfType (value As Object, wrongType As Type, ByRef message As Assert.AssertIsNotExactInstanceOfTypeInterpolatedStringHandler, Optional valueExpression As String = "")
Parameters
- value
- Object
The object the test expects not to be exactly of the specified type.
- wrongType
- Type
The exact type that value should not be.
The message to include in the exception when value
is exactly an instance of wrongType. The message is shown
in test results.
- valueExpression
- String
The syntactic expression of value as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.
Applies to
IsNotExactInstanceOfType(Object, Type, String, String)
Tests whether the specified object is not exactly an instance of the wrong type and throws an exception if the specified type matches exactly.
public static void IsNotExactInstanceOfType(object? value, Type? wrongType, string? message = "", string valueExpression = "");
static member IsNotExactInstanceOfType : obj * Type * string * string -> unit
Public Shared Sub IsNotExactInstanceOfType (value As Object, wrongType As Type, Optional message As String = "", Optional valueExpression As String = "")
Parameters
- value
- Object
The object the test expects not to be exactly of the specified type.
- wrongType
- Type
The exact type that value should not be.
- message
- String
The message to include in the exception when value
is exactly an instance of wrongType. The message is shown
in test results.
- valueExpression
- String
The syntactic expression of value as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.
Exceptions
Thrown if value is not null and
wrongType is exactly the type
of value.
Applies to
IsNotExactInstanceOfType<T>(Object, Assert.AssertGenericIsNotExactInstanceOfTypeInterpolatedStringHandler<T>, String)
Tests whether the specified object is not exactly an instance of the wrong generic type and throws an exception if the specified type matches exactly.
public static void IsNotExactInstanceOfType<T>(object? value, ref Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertGenericIsNotExactInstanceOfTypeInterpolatedStringHandler<T> message, string valueExpression = "");
static member IsNotExactInstanceOfType : obj * AssertGenericIsNotExactInstanceOfTypeInterpolatedStringHandler * string -> unit
Public Shared Sub IsNotExactInstanceOfType(Of T) (value As Object, ByRef message As Assert.AssertGenericIsNotExactInstanceOfTypeInterpolatedStringHandler(Of T), Optional valueExpression As String = "")
Type Parameters
- T
The exact type that value should not be.
Parameters
- value
- Object
- valueExpression
- String
Applies to
IsNotExactInstanceOfType<T>(Object, String, String)
Tests whether the specified object is not exactly an instance of the wrong generic type and throws an exception if the specified type matches exactly.
public static void IsNotExactInstanceOfType<T>(object? value, string? message = "", string valueExpression = "");
static member IsNotExactInstanceOfType : obj * string * string -> unit
Public Shared Sub IsNotExactInstanceOfType(Of T) (value As Object, Optional message As String = "", Optional valueExpression As String = "")
Type Parameters
- T
The exact type that value should not be.
Parameters
- value
- Object
- message
- String
- valueExpression
- String