forked from stretchr/testify
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a function to assert mock calls in order, resolving stretchr#741. I've added all the test cases I can think of and tried to design the edge cases around repeatability and optionality to make sense with the rest of the package. My one concern is about the v2 work - I hope this can fit into v1 with minimal pain on the maintainers side. > AssertExpectationsInOrder asserts that everything specified with On and Return was in fact called as expected in the order expected. Expectations set up for a specific number of times must be called that number of times before the next call to the mock is made. If optional, they do not need to be called the full number of times. Expectation with no specific limit must be called at least once unless optional.
- Loading branch information
Showing
3 changed files
with
463 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.