Is Debug.Assert obsolete if you write unit tests?
Posted
by
Justin Pihony
on Programmers
See other posts from Programmers
or by Justin Pihony
Published on 2012-04-15T14:08:54Z
Indexed on
2012/04/15
17:48 UTC
Read the original article
Hit count: 433
unit-testing
|assertions
Just like the question asks, is there a need to add Debug.Assert into your code if you are writing unit tests (which has its own assertions)? I could see that this might make the code more obvious without having to go into the tests, however it just seems that you might end up with duplicated asserts. It seems to me that Debug.Assert
was helpful before unit-testing became more prevalent, but is now unnecessary. Or, am I not thinking of some use case?
© Programmers or respective owner