Note: This API is now obsolete.
Create a new Dynamic Mock Object with ability to decide if Constructors should be mocked or not
Namespace: TypeMock
Assembly: TypeMock (in TypeMock.dll) Version: 9.3.6.0 (9.3.6.0)
Syntax
[ObsoleteAttribute("Use MockObject(Type,Constructor) instead", false)] public static MockObject MockObject( Type type, bool mockConstructors )
Parameters
- type
- Type: SystemType
The Type needed to be mocked - mockConstructors
- Type: SystemBoolean
Should constructors be mocked
Return Value
Type: MockObjectNew MockObject Object
Exceptions
Exception | Condition |
---|---|
TypeMockException | Will be throw if a Generic Type Class is being Mocked |
See Also