Mock Methods

Moq

Collapse imageExpand ImageCopy imageCopyHover image

The Mock type exposes the following members.

Methods

  NameDescription
Public methodAs<(Of <<'(TInterface>)>>)
Adds an interface implementation to the mock, allowing setups to be specified for it.
Public methodStatic memberGet<(Of <<'(T>)>>)
Retrieves the mock object for the given object instance.
Public methodStatic memberOf<(Of <<'(T>)>>)()()()()
Creates an mock object of the indicated type.
Public methodStatic memberOf<(Of <<'(T>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>))
Protected methodOnGetObject
Returns the mocked object value.
Public methodSetReturnsDefault<(Of <<'(TReturn>)>>)
Public methodVerify
Verifies that all verifiable expectations have been met.
Public methodVerifyAll
Verifies all expectations regardless of whether they have been flagged as verifiable.

See Also