Just another developer’s weblog

In one of my previous posts I discussed using Assert.Inconclusive() method to mark tests as "not finished yet" during the execution of the test (as opposed to declaring test outcomes using attributes such as [Pending]).

It turns out there’s a better way to do this (which Jeff Brown kindly pointed me to):

throw new SilentTestException(TestOutcome.Pending, "To be implemented.");

SilentTestException allows you to mark the test with any outcome you like. Which is exactly what I was looking for.

Yes, something consistent would be nice. In fact I would suggest marking the Assert.Inconsistent() as obsolete, to unify the interface. Assert.Fail() should of course stay, since it’s used much more often (I guess).