MockFactory Members

Moq 2.6

The MockFactory type exposes the following members.

Constructors

  NameDescription
MockFactory
Initializes the factory with the given defaultBehavior for newly created mocks from the factory.

Methods

  NameDescription
CreateOverloaded.
CreateMock<(Of <(T>)>)
Implements creation of a new mock within the factory.
Verify
Verifies all verifiable expectations on all mocks created by this factory.
VerifyAll
Verifies all verifiable expectations on all mocks created by this factory.
VerifyMocks
Invokes verifyAction for each mock in Mocks, and accumulates the resulting MockVerificationException that might be thrown from the action.

Properties

  NameDescription
CallBase
Whether the base member virtual implementation will be called for mocked classes if no expectation is met. Defaults to trueTruetruetrue (True in Visual Basic).
DefaultValue
Specifies the behavior to use when returning default values for unexpected invocations on loose mocks.
Mocks
Gets the mocks that have been created by this factory and that will get verified together.

See Also