Sdílet prostřednictvím


Assert.IsNotInstanceOfType Metoda

Definice

Přetížení

Name Description
IsNotInstanceOfType(Object, Type, String, String)

Testuje, zda zadaný objekt není instancí nesprávného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

IsNotInstanceOfType(Object, Type, Assert+AssertIsNotInstanceOfTypeInterpolatedStringHandler, String)

Testuje, zda zadaný objekt není instancí nesprávného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

IsNotInstanceOfType(Object, Type, String, Object[])

Testuje, zda zadaný objekt není instancí nesprávného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

IsNotInstanceOfType(Object, Type, Assert+AssertIsNotInstanceOfTypeInterpolatedStringHandler)

Testuje, zda zadaný objekt není instancí nesprávného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

IsNotInstanceOfType(Object, Type)

Testuje, zda zadaný objekt není instancí nesprávného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

IsNotInstanceOfType(Object, Type, String)

Testuje, zda zadaný objekt není instancí nesprávného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

IsNotInstanceOfType<T>(Object)

Testuje, zda zadaný objekt není instancí nesprávného obecného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

IsNotInstanceOfType<T>(Object, Assert.AssertGenericIsNotInstanceOfTypeInterpolatedStringHandler<T>)

Testuje, zda zadaný objekt není instancí nesprávného obecného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

IsNotInstanceOfType<T>(Object, String)

Testuje, zda zadaný objekt není instancí nesprávného obecného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

IsNotInstanceOfType<T>(Object, Assert.AssertGenericIsNotInstanceOfTypeInterpolatedStringHandler<T>, String)

Testuje, zda zadaný objekt není instancí nesprávného obecného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

IsNotInstanceOfType<T>(Object, String, Object[])

Testuje, zda zadaný objekt není instancí nesprávného obecného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

IsNotInstanceOfType<T>(Object, String, String)

Testuje, zda zadaný objekt není instancí nesprávného obecného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

IsNotInstanceOfType(Object, Type, String, String)

Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs

Testuje, zda zadaný objekt není instancí nesprávného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

public static void IsNotInstanceOfType(object? value, Type? wrongType, string? message = "", string valueExpression = "");
static member IsNotInstanceOfType : obj * Type * string * string -> unit
Public Shared Sub IsNotInstanceOfType (value As Object, wrongType As Type, Optional message As String = "", Optional valueExpression As String = "")

Parametry

value
Object

Objekt, který test očekává, nebude mít zadaný typ.

wrongType
Type

Typ, který value by neměl být.

message
String

Zpráva, která se má zahrnout do výjimky, pokud value je instancí wrongType. Zpráva se zobrazí ve výsledcích testu.

valueExpression
String

Syntaktický výraz hodnoty zadaný kompilátorem prostřednictvím výrazu argumentu volajícího. Uživatelé by neměli předávat hodnotu pro tento parametr.

Výjimky

Vyvolá se, pokud value není null a wrongType je v hierarchii dědičnosti value.

Platí pro

IsNotInstanceOfType(Object, Type, Assert+AssertIsNotInstanceOfTypeInterpolatedStringHandler, String)

Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs

Testuje, zda zadaný objekt není instancí nesprávného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

public static void IsNotInstanceOfType(object? value, Type? wrongType, ref Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertIsNotInstanceOfTypeInterpolatedStringHandler message, string valueExpression = "");
static member IsNotInstanceOfType : obj * Type * AssertIsNotInstanceOfTypeInterpolatedStringHandler * string -> unit
Public Shared Sub IsNotInstanceOfType (value As Object, wrongType As Type, ByRef message As Assert.AssertIsNotInstanceOfTypeInterpolatedStringHandler, Optional valueExpression As String = "")

Parametry

value
Object

Objekt, který test očekává, nebude mít zadaný typ.

wrongType
Type

Typ, který value by neměl být.

message
Assert.AssertIsNotInstanceOfTypeInterpolatedStringHandler

Zpráva, která se má zahrnout do výjimky, pokud value je instancí wrongType. Zpráva se zobrazí ve výsledcích testu.

valueExpression
String

Syntaktický výraz hodnoty zadaný kompilátorem prostřednictvím výrazu argumentu volajícího. Uživatelé by neměli předávat hodnotu pro tento parametr.

Platí pro

IsNotInstanceOfType(Object, Type, String, Object[])

Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs

Testuje, zda zadaný objekt není instancí nesprávného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

public static void IsNotInstanceOfType(object value, Type wrongType, string message, params object[] parameters);
public static void IsNotInstanceOfType(object? value, Type? wrongType, string? message, params object?[]? parameters);
static member IsNotInstanceOfType : obj * Type * string * obj[] -> unit
Public Shared Sub IsNotInstanceOfType (value As Object, wrongType As Type, message As String, ParamArray parameters As Object())

Parametry

value
Object

Objekt, který test očekává, nebude mít zadaný typ.

wrongType
Type

Typ, který value by neměl být.

message
String

Zpráva, která se má zahrnout do výjimky, pokud value je instancí wrongType. Zpráva se zobrazí ve výsledcích testu.

parameters
Object[]

Pole parametrů, které se má použít při formátování message.

Výjimky

Vyvolá se, pokud value není null a wrongType je v hierarchii dědičnosti value.

Platí pro

IsNotInstanceOfType(Object, Type, Assert+AssertIsNotInstanceOfTypeInterpolatedStringHandler)

Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs

Testuje, zda zadaný objekt není instancí nesprávného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

public static void IsNotInstanceOfType(object? value, Type? wrongType, ref Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertIsNotInstanceOfTypeInterpolatedStringHandler message);
static member IsNotInstanceOfType : obj * Type * AssertIsNotInstanceOfTypeInterpolatedStringHandler -> unit
Public Shared Sub IsNotInstanceOfType (value As Object, wrongType As Type, ByRef message As Assert.AssertIsNotInstanceOfTypeInterpolatedStringHandler)

Parametry

value
Object

Objekt, který test očekává, nebude mít zadaný typ.

wrongType
Type

Typ, který value by neměl být.

message
Assert.AssertIsNotInstanceOfTypeInterpolatedStringHandler

Zpráva, která se má zahrnout do výjimky, pokud value je instancí wrongType. Zpráva se zobrazí ve výsledcích testu.

Platí pro

IsNotInstanceOfType(Object, Type)

Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs

Testuje, zda zadaný objekt není instancí nesprávného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

public static void IsNotInstanceOfType(object value, Type wrongType);
public static void IsNotInstanceOfType(object? value, Type? wrongType);
static member IsNotInstanceOfType : obj * Type -> unit
Public Shared Sub IsNotInstanceOfType (value As Object, wrongType As Type)

Parametry

value
Object

Objekt, který test očekává, nebude mít zadaný typ.

wrongType
Type

Typ, který value by neměl být.

Výjimky

Vyvolá se, pokud value není null a wrongType je v hierarchii dědičnosti value.

Platí pro

IsNotInstanceOfType(Object, Type, String)

Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs

Testuje, zda zadaný objekt není instancí nesprávného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

public static void IsNotInstanceOfType(object value, Type wrongType, string message);
public static void IsNotInstanceOfType(object? value, Type? wrongType, string? message);
static member IsNotInstanceOfType : obj * Type * string -> unit
Public Shared Sub IsNotInstanceOfType (value As Object, wrongType As Type, message As String)

Parametry

value
Object

Objekt, který test očekává, nebude mít zadaný typ.

wrongType
Type

Typ, který value by neměl být.

message
String

Zpráva, která se má zahrnout do výjimky, pokud value je instancí wrongType. Zpráva se zobrazí ve výsledcích testu.

Výjimky

Vyvolá se, pokud value není null a wrongType je v hierarchii dědičnosti value.

Platí pro

IsNotInstanceOfType<T>(Object)

Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs

Testuje, zda zadaný objekt není instancí nesprávného obecného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

public static void IsNotInstanceOfType<T>(object? value);
static member IsNotInstanceOfType : obj -> unit
Public Shared Sub IsNotInstanceOfType(Of T) (value As Object)

Parametry typu

T

Typ, který value by neměl být.

Parametry

value
Object

Platí pro

IsNotInstanceOfType<T>(Object, Assert.AssertGenericIsNotInstanceOfTypeInterpolatedStringHandler<T>)

Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs

Testuje, zda zadaný objekt není instancí nesprávného obecného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

public static void IsNotInstanceOfType<T>(object? value, Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertGenericIsNotInstanceOfTypeInterpolatedStringHandler<T> message);
static member IsNotInstanceOfType : obj * Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertGenericIsNotInstanceOfTypeInterpolatedStringHandler<'T> -> unit
Public Shared Sub IsNotInstanceOfType(Of T) (value As Object, message As Assert.AssertGenericIsNotInstanceOfTypeInterpolatedStringHandler(Of T))

Parametry typu

T

Typ, který value by neměl být.

Parametry

value
Object

Platí pro

IsNotInstanceOfType<T>(Object, String)

Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs

Testuje, zda zadaný objekt není instancí nesprávného obecného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

public static void IsNotInstanceOfType<T>(object? value, string? message);
static member IsNotInstanceOfType : obj * string -> unit
Public Shared Sub IsNotInstanceOfType(Of T) (value As Object, message As String)

Parametry typu

T

Typ, který value by neměl být.

Parametry

value
Object
message
String

Platí pro

IsNotInstanceOfType<T>(Object, Assert.AssertGenericIsNotInstanceOfTypeInterpolatedStringHandler<T>, String)

Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs

Testuje, zda zadaný objekt není instancí nesprávného obecného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

public static void IsNotInstanceOfType<T>(object? value, Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertGenericIsNotInstanceOfTypeInterpolatedStringHandler<T> message, string valueExpression = "");
static member IsNotInstanceOfType : obj * Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AssertGenericIsNotInstanceOfTypeInterpolatedStringHandler<'T> * string -> unit
Public Shared Sub IsNotInstanceOfType(Of T) (value As Object, message As Assert.AssertGenericIsNotInstanceOfTypeInterpolatedStringHandler(Of T), Optional valueExpression As String = "")

Parametry typu

T

Typ, který value by neměl být.

Parametry

value
Object
valueExpression
String

Platí pro

IsNotInstanceOfType<T>(Object, String, Object[])

Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs

Testuje, zda zadaný objekt není instancí nesprávného obecného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

public static void IsNotInstanceOfType<T>(object? value, string? message, params object?[]? parameters);
static member IsNotInstanceOfType : obj * string * obj[] -> unit
Public Shared Sub IsNotInstanceOfType(Of T) (value As Object, message As String, ParamArray parameters As Object())

Parametry typu

T

Typ, který value by neměl být.

Parametry

value
Object
message
String
parameters
Object[]

Platí pro

IsNotInstanceOfType<T>(Object, String, String)

Zdroj:
Assert.IsInstanceOfType.cs
Zdroj:
Assert.IsInstanceOfType.cs

Testuje, zda zadaný objekt není instancí nesprávného obecného typu a vyvolá výjimku, pokud je zadaný typ v hierarchii dědičnosti objektu.

public static void IsNotInstanceOfType<T>(object? value, string? message = "", string valueExpression = "");
static member IsNotInstanceOfType : obj * string * string -> unit
Public Shared Sub IsNotInstanceOfType(Of T) (value As Object, Optional message As String = "", Optional valueExpression As String = "")

Parametry typu

T

Typ, který value by neměl být.

Parametry

value
Object
message
String
valueExpression
String

Platí pro