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

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 commented Mar 23, 2016

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

@mkotsur
Copy link
Owner

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants