The IMockControl type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() | AlwaysCallOriginal |
Indicate that the behavior of the mocked method will be to call the original method.
|
![]() | AlwaysReturn |
Expect unlimited calls from method, and always returns mock value
|
![]() | AlwaysThrow |
Expect unlimited calls from method, and always throws exception
|
![]() | AnonymousMethodOf |
Use to mock all anonymous methods that are called from within a method
|
![]() | AssignField |
Assign a new value to the given field.
|
![]() | Clear | Overloaded. |
![]() | ExpectAddEvent | Overloaded. |
![]() | ExpectAddEventAlways |
Expect unlimited number of event listeners to be added (event += new EventHandler())
|
![]() | ExpectAlways |
Expect unlimited calls from method
|
![]() | ExpectAndReturn | Overloaded. |
![]() | ExpectAndThrow | Overloaded. |
![]() | ExpectCall | Overloaded. |
![]() | ExpectConstructor | Overloaded. |
![]() | ExpectConstructorAlways |
Mock unlimited calls from Constructor
|
![]() | ExpectConstructorAndThrow |
Mock Constructor and throw exception when constructor is called
|
![]() | ExpectGet | Overloaded. |
![]() | ExpectGetAlways |
Expect unlimited get of a Property and always mock the Property's value
|
![]() | ExpectGetAndAlwaysThrow |
Expect unlimited get of a Property and always mock throwing an exception
|
![]() | ExpectGetAndThrow | Overloaded. |
![]() | ExpectGetIndex | Overloaded. |
![]() | ExpectGetIndexAlways |
Expect unlimited set of an Index and mock throwing an exception
|
![]() | ExpectGetIndexAndAlwaysThrow |
Expect unlimited set of an Index and mock throwing an exception
|
![]() | ExpectGetIndexAndThrow | Overloaded. |
![]() | ExpectRemoveEvent | Overloaded. |
![]() | ExpectSet | Overloaded. |
![]() | ExpectSetAlways |
Expect unlimited set of a Property
|
![]() | ExpectSetAndAlwaysThrow |
Expect unlimited set of a Property and always mock throwing an exception
|
![]() | ExpectSetAndThrow | Overloaded. |
![]() | ExpectSetIndex | Overloaded. |
![]() | ExpectSetIndexAlways |
Expect unlimited set of an Index
|
![]() | ExpectSetIndexAndAlwaysThrow |
Expect unlimited set of an Index and mock throwing an exception
|
![]() | ExpectSetIndexAndThrow | Overloaded. |
![]() | ExpectUnmockedCall | Overloaded. |
![]() | ExpectUnmockedConstructor | Overloaded. |
![]() | ExpectUnmockedGet | Overloaded. |
![]() | ExpectUnmockedSet | Overloaded. |
![]() | MethodSettings |
Perform Behavior tweaking on methods rather then the whole mocked type
|
![]() | MethodSettingsGetIndex |
Perform Behavior tweaking on methods rather then the whole mocked type
|
![]() | MethodSettingsGetProperty |
Perform Behavior tweaking on methods rather then the whole mocked type
|
![]() | MethodSettingsSetIndex |
Perform Behavior tweaking on methods rather then the whole mocked type
|
![]() | MethodSettingsSetProperty |
Perform Behavior tweaking on methods rather then the whole mocked type
|
![]() | MockField | Create a Mock object and assign it to a given field. |
Properties
Name | Description | |
---|---|---|
![]() | CallBase |
Allow mocking a method in a base class that is hidden by the mocked class
|
![]() | ValidateArgsOnVerify | Obsolete.
Obsolete. Argument validation is done both on calling the method and during Verify.
Postpone throwing validation errors till Verify()()() is called
|