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

Stub and method toString() #45

Closed
jansyk13 opened this issue Mar 23, 2016 · 2 comments
Closed

Stub and method toString() #45

jansyk13 opened this issue Mar 23, 2016 · 2 comments

Comments

@jansyk13
Copy link

@jansyk13 jansyk13 commented Mar 23, 2016

When calling method gotStubsCommitmentsDone() in EnsureHttp, in case of AssertionError the error message is not comprehensive. This makes testing and debugging hell.

Example:

"Expected stub com.xebialabs.restito.semantics.Stub@6a5f05f5 to be called 1 times, called 0 times instead"

@mkotsur
Copy link
Owner

@mkotsur mkotsur commented Mar 23, 2016

@jansyk13 good point. Would you make a PR for that?

mkotsur added a commit that referenced this issue Jun 8, 2016
@mkotsur mkotsur closed this in 09fb0d3 Aug 29, 2017
@mkotsur
Copy link
Owner

@mkotsur mkotsur commented Aug 29, 2017

I don't know if you guys are still interested, but now there is a solution! You can assign labels to stubs like this now:

whenHttp(server).match("Fancy stub", get("/neverHappens")).then(ok()).mustHappen();

ensureHttp(server).gotStubsCommitmentsDone();

Then the error message will be:
Expected stub Stub@6a5f05f5 [Fancy stub] to be called 1 times, called 0 times instead

Any feedback is appreciated! /cc @jansyk13 @shamoh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.