Does heavy use of unit tests discourage the use of debug asserts? It seems like a debug assert firing in the code under test implies the unit test shouldn\'t exist or the d
Like the others have mentioned, the Debug.Assert statements should always be true, even if arguements are incorrect, the assertion should be true to stop the app getting into an invalid state etc.
Debug.Assert(_counter == somethingElse, "Erk! Out of wack!");
You should not be able to test this (and probably don't want to because there is nothing you can do really!)
I could be way off but I get the impression that perhaps the asserts you may be talking about are better suited as "argument exceptions", e.g.
if (param1 == null)
throw new ArgumentNullException("param1", "message to user")
That kind of "assertion" in your code is still very testable.
PK :-)