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

Introduce mockSequence and further simplify tests #569

Merged
merged 1 commit into from
Nov 16, 2015

Conversation

horkhe
Copy link
Contributor

@horkhe horkhe commented Nov 13, 2015

This PR introduces mockSequence response builder that is created of a sequence of (mock)responses and everytime when MockBroker calls its For method it returns the next response from the sequence. When the last element in the sequence is reached it is returned for every subsequent call of the For method.

This change allows to define MockBrocker handler with SetHandlerByMap exclusively, that makes tests a bit shorter and easier to read.

@eapache
Copy link
Contributor

eapache commented Nov 13, 2015

LGTM. @wvanbergen ?

@wvanbergen
Copy link
Contributor

Much nicer 👍

wvanbergen added a commit that referenced this pull request Nov 16, 2015
Introduce mockSequence and further simplify tests
@wvanbergen wvanbergen merged commit b1904b9 into IBM:master Nov 16, 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.

3 participants