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