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

Sequential mocks new #23

Merged
merged 4 commits into from
Nov 4, 2023
Merged

Sequential mocks new #23

merged 4 commits into from
Nov 4, 2023

Conversation

surajp
Copy link
Owner

@surajp surajp commented Nov 4, 2023

Add ability to mock methods with different return values or exceptions, based on call counts. This was born out of #18 but differs in the implementation detail.

Ability for the same method to be mocked with a different return value
each time can be useful in mocking utility methods, selector classes,
etc. We use a separate map to keep track of mocks based on method call
count so in the future we can potentially extend this algorithm to
support additional conditions for mocking
Instead of the end of method call chains as it is clearer and easier to
keep track of
@surajp surajp merged commit ad4106e into master Nov 4, 2023
1 check passed
@surajp surajp deleted the sequential-mocks-new branch November 4, 2023 13:39
@surajp surajp mentioned this pull request Nov 4, 2023
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.

1 participant