The Mock type exposes the following members.

Constructors

  NameDescription
Mock
Initializes a new instance of the Mock class.

Methods

  NameDescription
As<(Of <(TInterface>)>)
Adds an interface implementation to the mock, allowing setups to be specified for it.
Get<(Of <(T>)>)
Retrieves the mock object for the given object instance.
OnGetObject
Returns the mocked object value.
Verify
Verifies that all verifiable expectations have been met.
VerifyAll
Verifies all expectations regardless of whether they have been flagged as verifiable.

Properties

  NameDescription
Behavior
Behavior of the mock, according to the value set in the constructor.
CallBase
Whether the base member virtual implementation will be called for mocked classes if no setup is matched. Defaults to falseFalsefalsefalse (False in Visual Basic).
DefaultValue
Specifies the behavior to use when returning default values for unexpected invocations on loose mocks.
Object
Gets the mocked object instance, which is of the mocked type T.

See Also