MockRepository Members

Moq

Collapse imageExpand ImageCopy imageCopyHover image

The MockRepository type exposes the following members.

Constructors

  NameDescription
Public methodMockRepository
Initializes the repository with the given defaultBehavior for newly created mocks from the repository.

Methods

  NameDescription
Public methodCreate<(Of <<'(T>)>>)()()()()
Creates a new mock with the default MockBehavior specified at factory construction time.
(Inherited from MockFactory.)
Public methodCreate<(Of <<'(T>)>>)(array<Object>[]()[][])
Creates a new mock with the default MockBehavior specified at factory construction time and with the the given constructor arguments for the class.
(Inherited from MockFactory.)
Public methodCreate<(Of <<'(T>)>>)(MockBehavior)
Creates a new mock with the given behavior.
(Inherited from MockFactory.)
Public methodCreate<(Of <<'(T>)>>)(MockBehavior, array<Object>[]()[][])
Creates a new mock with the given behavior and with the the given constructor arguments for the class.
(Inherited from MockFactory.)
Protected methodCreateMock<(Of <<'(T>)>>)
Implements creation of a new mock within the factory.
(Inherited from MockFactory.)
Public methodOf<(Of <<'(T>)>>)()()()()
Access the universe of mocks of the given type, to retrieve those that behave according to the LINQ query specification.
Public methodOf<(Of <<'(T>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>))
Public methodOneOf<(Of <<'(T>)>>)()()()()
Creates an mock object of the indicated type.
Public methodOneOf<(Of <<'(T>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>))
Public methodVerify
Verifies all verifiable expectations on all mocks created by this factory.
(Inherited from MockFactory.)
Public methodVerifyAll
Verifies all verifiable expectations on all mocks created by this factory.
(Inherited from MockFactory.)
Protected methodVerifyMocks
Invokes verifyAction for each mock in Mocks, and accumulates the resulting MockVerificationException that might be thrown from the action.
(Inherited from MockFactory.)

Properties

  NameDescription
Public propertyCallBase
Whether the base member virtual implementation will be called for mocked classes if no setup is matched. Defaults to falseFalsefalsefalse (False in Visual Basic).
(Inherited from MockFactory.)
Public propertyDefaultValue
Specifies the behavior to use when returning default values for unexpected invocations on loose mocks.
(Inherited from MockFactory.)
Protected propertyMocks
Gets the mocks that have been created by this factory and that will get verified together.
(Inherited from MockFactory.)

See Also