-
Notifications
You must be signed in to change notification settings - Fork 3
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
Better assertion' message check #326
Comments
"@l3r8yJ, that's a good suggestion actually. I thought about it myself. The check might be rather useful on one hand but require lots of boilerplate code on the other hand.
This gives:
So, as you can see, there is no need to duplicate |
@volodya-lombrozo sure, good point about boilerplate code, but it seems to be very obvious what happens on simple cases, but in real code unit tests are more complicated. So, even in simple case like this,
Yes, but in text with placeholders we can put some explanations or additions, what actually was wrong. For example: "The %s should contain %s.\n\tWhen of %s#methodName was called, this should have modified the original collection, but it didn't happen."
.formatted(collection, secretElement, caller) and now, i'm know that i should go to Yes, this example very verbose, but, i think it's shows what i'm trying to say, wdyt? |
@l3r8yJ I agree with you. Let's start by adding this feature as an experimental one. If it demonstrates promising results, we can then integrate it into our standard list. |
@volodya-lombrozo sure, this feature quite controversial; it would be better if we can switch it back and forth |
@volodya-lombrozo I think the description of each assertion should contain placeholders to describe what we actually want to get and what was wrong, otherwise the description message doesn't make any sense, wdyt?
invalid:
valid:
The text was updated successfully, but these errors were encountered: