Timeline for Is it OK to have multiple asserts in a single unit test?
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 19, 2018 at 4:47 | comment | added | CurtainDog | It's better to let the test run, even on invalid input. It gives you more information that way (and especially if it still passes when you didn't expect it to). | |
| Oct 21, 2016 at 18:38 | comment | added | Bjorn | Your asserts would make for very nice test names. | |
| Mar 7, 2016 at 16:37 | comment | added | Borjab | What are your opinions about refactoring it into a assertAlarmStatus( int numberOfAlarmMessages);? | |
| May 12, 2015 at 13:01 | history | edited | user40980 | CC BY-SA 3.0 | Switch from code tags to markdown format. Add syntax hint. |
| Sep 11, 2013 at 9:30 | comment | added | mdma | I write tests like this too so that you can be confident of what the code is doing and state changes, I don't think this is a unit test, but an integration test. | |
| Oct 26, 2012 at 13:44 | comment | added | Kemoda | When you do that you you should better using testing frameworks with dependant tests, it is better (e.g. testng supports this feature) | |
| Sep 28, 2010 at 14:47 | history | edited | BlairHippo | CC BY-SA 2.5 | added 162 characters in body |
| Sep 28, 2010 at 14:27 | history | answered | BlairHippo | CC BY-SA 2.5 |