-
Notifications
You must be signed in to change notification settings - Fork 185
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 a not
switch on Assert class
#265
base: master
Are you sure you want to change the base?
Conversation
9931983
to
c17785c
Compare
For some reasons, on the travis, I have some failure, and I don't really understand why as it's nothing I touched ? Especially as the PR I opened before (#264) was working correctly... |
c17785c
to
eadce1b
Compare
I took your code and updated the documentation. |
And then found issues! Sigh. It's late in the year. I've reverted the change to master for this code and will leave your pull request open. If you can update it with master and then work on the following:
I like the idea of having an assertion and just putting |
I also thought about preventing the I'll try to come up with something after the holidays :) |
Note that I also thought about just catching the exception and return true, but as you said, the hard bit is creating the alternate message... |
For the double nots, I think just removing the existing notXxxx method in favour of the automatic notXxxx method (if that makes sense). Essentially, anyone writing a new assertion will automatically have the invert of their assertion available. No need to manually create the not variant. Thanks for the work so far. I've just released v3.2.0. Have a good XMas. |
After a "quick" look, I don't think it really is easily manageable to add a
So IMO, a first simple step is as I made it, and assume that a while I do agree that having to manually write the |
eadce1b
to
01ed0bc
Compare
Rebased onto upstream/master. Ping @rquadling (Still looking for suggestions on how to handle things properly) |
(Failures unrelated) |
Add a
not
helper method onAssertion
to "negate" an assertion. Asall
does, it just adds anot
in front of the method name, before theadd
is added.