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

Should? Really? #20

Open
MockOfT opened this issue Apr 27, 2020 · 1 comment
Open

Should? Really? #20

MockOfT opened this issue Apr 27, 2020 · 1 comment

Comments

@MockOfT
Copy link

MockOfT commented Apr 27, 2020

IMO:

I mean it in the nicest way possible (although it is going to be hard).

  1. For me to understand what the tests do, I look for "Is" or "Are" or "Must", "HasTo", "Does", "Calls" but not "Should"; not this soft and nice "Should"; it sounds like "if you have a chance to do it" or similar.

  2. Having it as an extension and using it at the end of the statement is harder to read and understand the intension. One is Asserting that something works and therefore stating it in the first place.

@ipashchuk
Copy link

@MockOfT , raising this issue is basically saying that this library is flawed to its core... I and tens of thousands of developers who are using this library respectfully disagree.

  1. In legalese, "should" or "shall" is a contractual obligation, not merely a suggestion. But, I understand your point and agree to some extent that "should" has much less force than "must" in our vernacular. There is an interesting discussion on this point here: https://softwareengineering.stackexchange.com/questions/45783/when-writing-specs-bdd-style-should-you-use-should-or-should-you-not.
  2. I completely disagree. I have a result, I want to see if it's as expected. I would much rather assert:
    actual should be equal to expected
    than
    assert equality between actual and expected
    nUnit, for example, easily allows developers to transpose actual and expected parameters

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