I'm trying to figure out how to have tests fail as 'Inconclusive' if some required setup that also exists as a test fails.
This is an overly simplified example of what I'm trying to do, but hopefully it illustrates the point:
[Test] public void TestSetter() { Assert.That(() => myInstance.Property = "test", Throws.Nothing); } [Test] public void TestGetter() { try { TestSetter(); } catch (AssertionException) { Assert.Inconclusive("Unable to test, prereq failed"); } Assert.That(myInstance.Property, Is.EqualTo("test")); } This doesn't seem to work though, if I force the TestSetter test to fail, both still show the 'Failed' result, instead of the TestGetter resulting in 'Inconclusive'. I stepped through the code, it's definitely hitting the Assert.Inconclusive call, but it seems the earlier AssertionException is still getting precedence.
Is there any way of getting this to correctly report 'Inconclusive'?
Using C#7, with NUnit 3.6.0