So why are there not Assert.Less/LessEqual/Greater/GreaterEqual? #2143
Answered
by
bradwilson
Happypig375
asked this question in
General
-
I see that https://xunit.net/docs/comparisons lists Assert.True as an alternative. However, as with Assert.Equal/NotEqual/InRange, these methods can provide better error messages. This is why NUnit has them. Moreover, I am surprised that nobody has raised this before. Why are these not there? |
Beta Was this translation helpful? Give feedback.
Answered by
bradwilson
Sep 10, 2020
Replies: 1 comment
-
Here's the original reasoning why we didn't do this: it doesn't read well. For example, compare this to: Assert.True(x > 12, "x should be more than 12"); vs. Assert.Greater(12, x); This follows the standard pattern of |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Happypig375
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's the original reasoning why we didn't do this: it doesn't read well.
For example, compare this to:
vs.
This follows the standard pattern of
(expected, actual)
for parameters.