Equivalent of assert.warning in mstest?

Hannoun Yassir picture Hannoun Yassir · Sep 2, 2009 · Viewed 10k times · Source

is there a MsTest Equivalent of Assert.Warning in MbUnit ?

Answer

Mark Seemann picture Mark Seemann · Sep 3, 2009

The closest match is Assert.Inconclusive() - it doesn't make the test fail as such, but it doesn't succeed either. It fall into a third stage called Inconclusive.

A single Inconclusive test will cause an entire test suite to be Inconclusive.

There are overloads that supports custom messages as well:

Assert.Inconclusive("Ploeh");