Search code examples
c#unit-testingmstestmbunit

Equivalent of assert.warning in mstest?


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


Solution

  • 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");