Mocker..::..CreateMockInstance<(Of <(<'T>)>)> Method (Boolean, array<Object>[]()[][])

Creates the mock instance that is not automatically injected.

Namespace:  FastMoq
Assembly:  FastMoq.Core (in FastMoq.Core.dll)

Syntax


public Mock<T> CreateMockInstance<T>(
	bool nonPublic,
	params Object[] args
)
Public Function CreateMockInstance(Of T) ( _
	nonPublic As Boolean, _
	ParamArray args As Object() _
) As Mock(Of T)
public:
generic<typename T>
Mock<T>^ CreateMockInstance(
	bool^ nonPublic, 
	... array<Object^>^ args
)

Type Parameters

T

Parameters

nonPublic
Type: Boolean
if set to true can use non-public constructor.
args
Type: array<Object>[]()[][]
The arguments used to find the correct constructor for a class.

Return Value

Mock.

Exceptions


ExceptionCondition
ArgumentExceptiontype must be a class. - type
ApplicationExceptionCannot create instance.