Stub Method

Moq 2.6

Overload List

  NameDescription
Stub<(Of <(T, TProperty>)>)(Mock<(Of <(T>)>), Expression<(Of <(Func<(Of <(T, TProperty>)>)>)>))
Specifies that the given property should have stub behavior, meaning that setting its value will cause it to be saved and later returned when the property is requested.
Stub<(Of <(T, TProperty>)>)(Mock<(Of <(T>)>), Expression<(Of <(Func<(Of <(T, TProperty>)>)>)>), TProperty)
Specifies that the given property should have stub behavior, meaning that setting its value will cause it to be saved and later returned when the property is requested. This overload allows setting the initial value for the property.

See Also