CreateMock(T) Method

Moq 2.6

Implements creation of a new mock within the factory.

Namespace:  Moq
Assembly:  Moq (in Moq.dll) Version: 2.6.1014.1 (2.6.0.0)

Syntax

C#
protected virtual Mock<T> CreateMock<T>(
	MockBehavior behavior,
	Object[] args
)
where T : class

Parameters

behavior
Type: Moq..::.MockBehavior
The behavior for the new mock.
args
Type: array< Object >[]()[]
Optional arguments for the construction of the mock.

Type Parameters

T
Type to mock.

See Also