Mocker..::..CreateMock Method (Type, Boolean, array<Object>[]()[][])
Creates the MockModel from the Type. This throws an exception if the mock already exists.
Namespace:
FastMoqAssembly: FastMoq.Core (in FastMoq.Core.dll)
Syntax
Parameters
- type
- Type: Type
The type.
- nonPublic
- Type: Boolean
true if non-public and public constructors are used.
- args
- Type: array<Object>[]()[][]
The arguments used to match to the constructor.
Return Value
List<T>.Exceptions
Exception | Condition |
---|---|
ArgumentException | type must be a class. - type |
ApplicationException | Cannot create instance. |