The Mock<(Of <(T>)>) type exposes the following members.

Constructors

  NameDescription
Mock<(Of <(T>)>)Overloaded.

Methods

  NameDescription
As<(Of <(TInterface>)>)
Adds an interface implementation to the mock, allowing expectations to be set for it.
CreateEventHandler<(Of <(TEventArgs>)>)
Creates a handler that can be associated to an event receiving the given TEventArgs and can be used to raise the event.
(Inherited from Mock.)
ExpectOverloaded.
ExpectGet<(Of <(TProperty>)>)
Sets an expectation on the mocked type for a call to to a property getter.
ExpectSetOverloaded.
GetObject
Returns the mocked object value.
(Overrides Mock..::.GetObject()()().)
Raise
Raises the event referenced in eventExpression using the given sender and args arguments.
VerifyOverloaded.
VerifyGet<(Of <(TProperty>)>)
Verifies that a property was read on the mock. Use in conjuntion with the default Loose.
VerifySetOverloaded.

Properties

  NameDescription
Behavior
Behavior of the mock, according to the value set in the constructor.
(Inherited from Mock.)
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).
(Inherited from Mock.)
DefaultValue
Specifies the behavior to use when returning default values for unexpected invocations on loose mocks.
(Inherited from Mock.)
ImplementedInterfaces
Exposes the list of extra interfaces implemented by the mock.
(Inherited from Mock.)
Object
Exposes the mocked object instance.

See Also