0

When using ReSharper's built in test runner with FluentAssertions a test failing will produce an output message that you can specify within the test. In some cases having this output appear on a passing test would still be useful, mostly to help identify a false positive.

Is there a way to get that output with passing tests? I'm using the XUnit.net testing framework if this helps.

LWood
  • 417
  • 4
  • 16

1 Answers1

3

That output message is part of the XUnit-specific assertion exception that FluentAssertions throws whenever an assertion fails. If the test is succesful, I can't throw that exception without failing the test. Plus, dumping that message to the output doesn't work either. XUnit 2 no longer captures console output.

Dennis Doomen
  • 8,368
  • 1
  • 32
  • 44