![Collapse image Collapse image](collapse_all.gif)
![Expand Image Expand Image](expand_all.gif)
![](collapse_all.gif)
![](expand_all.gif)
![](dropdown.gif)
![](dropdownHover.gif)
![Copy image Copy image](icons/copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
Implements creation of a new mock within the factory.
Namespace: Moq
Assembly: Moq (in Moq.dll) Version: 4.0.10827.0 (4.0.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<System..::..Object>[]()[][]
Optional arguments for the construction of the mock.
Type Parameters
- T
- Type to mock.