PrivateObject PrivateObject PrivateObject Constructors

Definition

Overloads

PrivateObject(Object) PrivateObject(Object) PrivateObject(Object)

Initializes a new instance of the PrivateObject class that wraps the given object.

PrivateObject(Object, PrivateType) PrivateObject(Object, PrivateType) PrivateObject(Object, PrivateType)

Initializes a new instance of the PrivateObject class that wraps the given object.

PrivateObject(Object, String) PrivateObject(Object, String) PrivateObject(Object, String)

Initializes a new instance of the PrivateObject class that contains the already existing object of the private class

PrivateObject(Type, Object[]) PrivateObject(Type, Object[])

Initializes a new instance of the PrivateObject class that wraps the specified type.

PrivateObject(String, String, Object[]) PrivateObject(String, String, Object[]) PrivateObject(String, String, Object[])

Initializes a new instance of the PrivateObject class that wraps the specified type.

PrivateObject(Type, Type[], Object[]) PrivateObject(Type, Type[], Object[])

Initializes a new instance of the PrivateObject class that wraps the specified type.

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

Initializes a new instance of the PrivateObject class that wraps the specified type.

PrivateObject(Object) PrivateObject(Object) PrivateObject(Object)

Initializes a new instance of the PrivateObject class that wraps the given object.

public PrivateObject (object obj);
new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject : obj -> Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject
Public Sub New (obj As Object)

Parameters

obj
Object Object Object

object to wrap

PrivateObject(Object, PrivateType) PrivateObject(Object, PrivateType) PrivateObject(Object, PrivateType)

Initializes a new instance of the PrivateObject class that wraps the given object.

public PrivateObject (object obj, Microsoft.VisualStudio.TestTools.UnitTesting.PrivateType type);
new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject : obj * Microsoft.VisualStudio.TestTools.UnitTesting.PrivateType -> Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject
Public Sub New (obj As Object, type As PrivateType)

Parameters

obj
Object Object Object

object to wrap

type
PrivateType PrivateType PrivateType

PrivateType object

PrivateObject(Object, String) PrivateObject(Object, String) PrivateObject(Object, String)

Initializes a new instance of the PrivateObject class that contains the already existing object of the private class

public PrivateObject (object obj, string memberToAccess);
new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject : obj * string -> Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject
Public Sub New (obj As Object, memberToAccess As String)

Parameters

obj
Object Object Object

object that serves as starting point to reach the private members

memberToAccess
String String String

the derefrencing string using . that points to the object to be retrived as in m_X.m_Y.m_Z

PrivateObject(Type, Object[]) PrivateObject(Type, Object[])

Initializes a new instance of the PrivateObject class that wraps the specified type.

public PrivateObject (Type type, params object[] args);
new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject : Type * obj[] -> Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject

Parameters

type
Type Type Type

type of the object to create

args
Object[]

Argmenets to pass to the constructor

PrivateObject(String, String, Object[]) PrivateObject(String, String, Object[]) PrivateObject(String, String, Object[])

Initializes a new instance of the PrivateObject class that wraps the specified type.

public PrivateObject (string assemblyName, string typeName, params object[] args);
new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject : string * string * obj[] -> Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject
Public Sub New (assemblyName As String, typeName As String, ParamArray args As Object())

Parameters

assemblyName
String String String

Name of the assembly

typeName
String String String

fully qualified name

args
Object[]

Argmenets to pass to the constructor

PrivateObject(Type, Type[], Object[]) PrivateObject(Type, Type[], Object[])

Initializes a new instance of the PrivateObject class that wraps the specified type.

public PrivateObject (Type type, Type[] parameterTypes, object[] args);
new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject : Type * Type[] * obj[] -> Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject

Parameters

type
Type Type Type

type of the object to create

parameterTypes
Type[]

An array of Type objects representing the number, order, and type of the parameters for the constructor to get

args
Object[]

Argmenets to pass to the constructor

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

Initializes a new instance of the PrivateObject class that wraps the specified type.

public PrivateObject (string assemblyName, string typeName, Type[] parameterTypes, object[] args);
new Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject : string * string * Type[] * obj[] -> Microsoft.VisualStudio.TestTools.UnitTesting.PrivateObject
Public Sub New (assemblyName As String, typeName As String, parameterTypes As Type(), args As Object())

Parameters

assemblyName
String String String

Name of the assembly

typeName
String String String

fully qualified name

parameterTypes
Type[]

An array of Type objects representing the number, order, and type of the parameters for the constructor to get

args
Object[]

Argmenets to pass to the constructor

Applies to