Background. In a legacy product, we saw some tests start failing intermittently....
source link: https://twitter.com/joshuamck/status/1572528796125003777
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Tweet
Conversation
You mention two issues. With regards to short-circuiting, does it matter when the test passes?
And does it matter if you first wrote the first assertion, saw it fail, made it pass, checked in, and then added the second assertion?
Related:
I realise that my response could be construed as moving the goalpost.
To elaborate, I'm not against having only a single assertion. `Assert.Equal(expected, actual)` is my ideal.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK