![Collapse image Collapse image](collapse_all.gif)
![Expand Image Expand Image](expand_all.gif)
![](collapse_all.gif)
![](expand_all.gif)
![](dropdown.gif)
![](dropdownHover.gif)
![Copy image Copy image](icons/copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
The Mock<(Of <(<'T>)>)> type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() | As<(Of <<'(TInterface>)>>) |
Adds an interface implementation to the mock,
allowing setups to be specified for it.
(Inherited from Mock.) |
![]() | OnGetObject |
Returns the mocked object value.
(Overrides Mock..::..OnGetObject()()()().) |
![]() | Raise(Action<(Of <<'(T>)>>), EventArgs) |
Raises the event referenced in eventExpression using
the given args argument.
|
![]() | Raise(Action<(Of <<'(T>)>>), array<Object>[]()[][]) |
Raises the event referenced in eventExpression using
the given args argument for a non-EventHandler typed event.
|
![]() | SetReturnsDefault<(Of <<'(TReturn>)>>) | (Inherited from Mock.) |
![]() | Setup(Expression<(Of <<'(Action<(Of <<'(T>)>>)>)>>)) |
Specifies a setup on the mocked type for a call to
to a void method.
|
![]() | Setup<(Of <<'(TResult>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>)) | |
![]() | SetupAllProperties |
Specifies that the all properties on the mock should have "property behavior",
meaning that setting its value will cause it to be saved and
later returned when the property is requested. (this is also
known as "stubbing"). The default value for each property will be the
one generated as specified by the DefaultValue property for the mock.
|
![]() | SetupGet<(Of <<'(TProperty>)>>) | |
![]() | SetupProperty<(Of <<'(TProperty>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>)) | |
![]() | SetupProperty<(Of <<'(TProperty>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>), Boolean) | |
![]() | SetupSet(Action<(Of <<'(T>)>>)) |
Specifies a setup on the mocked type for a call to
to a property setter.
|
![]() | SetupSet<(Of <<'(TProperty>)>>)(Action<(Of <<'(T>)>>)) |
Specifies a setup on the mocked type for a call to
to a property setter.
|
![]() | Verify()()()() |
Verifies that all verifiable expectations have been met.
(Inherited from Mock.) |
![]() | Verify(Expression<(Of <<'(Action<(Of <<'(T>)>>)>)>>)) |
Verifies that a specific invocation matching the given expression was performed on the mock. Use
in conjuntion with the default Loose.
|
![]() | Verify(Expression<(Of <<'(Action<(Of <<'(T>)>>)>)>>), Times) |
Verifies that a specific invocation matching the given expression was performed on the mock. Use
in conjuntion with the default Loose.
|
![]() | Verify(Expression<(Of <<'(Action<(Of <<'(T>)>>)>)>>), String) |
Verifies that a specific invocation matching the given expression was performed on the mock,
specifying a failure error message. Use in conjuntion with the default
Loose.
|
![]() | Verify(Expression<(Of <<'(Action<(Of <<'(T>)>>)>)>>), Times, String) |
Verifies that a specific invocation matching the given expression was performed on the mock,
specifying a failure error message. Use in conjuntion with the default
Loose.
|
![]() | Verify<(Of <<'(TResult>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>)) | |
![]() | Verify<(Of <<'(TResult>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>), Boolean) | |
![]() | Verify<(Of <<'(TResult>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>), Boolean, T) | |
![]() | VerifyAll |
Verifies all expectations regardless of whether they have
been flagged as verifiable.
(Inherited from Mock.) |
![]() | VerifyGet<(Of <<'(TProperty>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>)) | |
![]() | VerifyGet<(Of <<'(TProperty>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>), Boolean) | |
![]() | VerifyGet<(Of <<'(TProperty>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>), Boolean, T) | |
![]() | VerifySet(Action<(Of <<'(T>)>>)) |
Verifies that a property was set on the mock.
|
![]() | VerifySet(Action<(Of <<'(T>)>>), Times) |
Verifies that a property was set on the mock.
|
![]() | VerifySet(Action<(Of <<'(T>)>>), String) |
Verifies that a property was set on the mock, specifying
a failure message.
|
![]() | VerifySet(Action<(Of <<'(T>)>>), Times, String) |
Verifies that a property was set on the mock, specifying
a failure message.
|
![]() | When |
Extension Methods
Name | Description | |
---|---|---|
![]() | InSequence<(Of <<'(TMock>)>>) |
Perform an expectation in the trace.
(Defined by MockSequenceHelper.) |
![]() | Protected<(Of <<'(T>)>>) |
Enable protected setups for the mock.
(Defined by ProtectedExtension.) |
![]() | SetupSequence<(Of <<'(TMock, TResult>)>>) | (Defined by SequenceExtensions.) |
![]() | SetupSet<(Of <<'(T, TProperty>)>>) | (Defined by MockExtensions.) |
![]() | VerifySet<(Of <<'(T, TProperty>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>)) | Overloaded. (Defined by MockExtensions.) |
![]() | VerifySet<(Of <<'(T, TProperty>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>), Boolean) | Overloaded. (Defined by MockExtensions.) |
![]() | VerifySet<(Of <<'(T, TProperty>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>), Boolean) | Overloaded. (Defined by MockExtensions.) |
![]() | VerifySet<(Of <<'(T, TProperty>)>>)(Expression<(Of <<'(Func<(Of <(<'T, TResult>)>)>>)>>), Boolean, T) | Overloaded. (Defined by MockExtensions.) |