Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added MockExtensions.Reset() to clear mock state (expectations+invocations) #138

Merged
merged 1 commit into from
Jun 20, 2015

Conversation

ashmind
Copy link
Contributor

@ashmind ashmind commented Nov 4, 2014

This change adds MockExtensions.Reset(Mock) that completely resets the mock by removing all expectations and all actual invocations.

Use case:
Mocking singleton-lifetime object in integration tests where it is not possible to reset application state completely between tests -- so the mock instance can potentially be cached in other singleton services and cannot be replaced with a new mock.

kzu added a commit that referenced this pull request Jun 20, 2015
Added MockExtensions.Reset() to clear mock state (expectations+invocations)
@kzu kzu merged commit 7e7df4c into devlooped:master Jun 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants