MockManagerMockObject Method (Type, Constructor, Object)

Typemock Isolator Developer Guide
Create a new Dynamic Mock Object with ability to define the scope of mocked Constructors (default is to mock all constructors)

Namespace:  TypeMock
Assembly:  TypeMock (in TypeMock.dll) Version: 9.4.1.0 (9.4.1.0)
Syntax

public static MockObject MockObject(
	Type type,
	Constructor mockConstructors,
	params Object[] args
)

Parameters

type
Type: SystemType
The Type needed to be mocked
mockConstructors
Type: TypeMockConstructor
Scope of mocked constructors
args
Type: SystemObject
Argument for constructor of concrete types, this is ignored for interfaces

Return Value

Type: MockObject
New MockObject Object
Exceptions

ExceptionCondition
TypeMockExceptionWill be throw if a Generic Type Class is being Mocked
See Also

Reference