







Creates a new mock with the default MockBehavior
specified at factory construction time.
Namespace:
Moq
Assembly:
Moq (in Moq.dll) Version: 2.6.1014.1 (2.6.0.0)
Syntax
C# |
---|
public Mock<T> Create<T>() where T : class |
Type Parameters
- T
- Type to mock.
Return Value
A new Mock<(Of <(T>)>).
Examples

var factory = new MockFactory(MockBehavior.Strict); var foo = factory.Create<IFoo>(); // use mock on tests factory.VerifyAll();