-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add DarcyWebMatchers with HasClass matcher #46
base: master
Are you sure you want to change the base?
Conversation
Thinking a bit more about this while at lunch, I wonder if it would be better to accept a |
I decided that using the |
|
||
import org.hamcrest.Matcher; | ||
|
||
public abstract class DarcyWebMatchers { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worthwhile to extend darcy-ui's DarcyMatchers. This makes it easier to consume all matchers, and prevents name collisions (which is important because I imagine these will be ripe for static imports).
For clarification, are you saying either use |
The former: use the diagnosing matcher in the matcher you are writing. The alternative is to not write another matcher at all, and just use the collections matchers already available against the |
Oh yeah that makes complete sense, duh, the matchers already exist for collections. Uhh, yeah...brain still waking up for Monday. I'll get this fixed. Thanks for the quick response. |
} | ||
|
||
description.appendText("could not find a matching class in ") | ||
.appendValue(t.getClasses()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two improvements you can make with this and then we're good:
- Append the element to String and the getClasses -- again if we just use getClasses, then this is no better than using the already provided collection matchers
- Also use the matcher provided to describe what about a class you were looking for
Hey @dmcneil :-). Any interest in working on those last two improvements? |
No description provided.