Reputation: 1332
I often use TestContext.WriteLine
in my MSTest unit tests to output data relevant to the test that's running. This is instead of using Console or Debug as it's possible the code that's being tested may be dumping data there, and I don't want my unit test stuff thrown in among all that. Visual Studio separates all three of these out quite nicely.
In converting a set of unit tests over to NUnit, however, I'm not seeing a way to use this call within an NUnit test.
Where can I find this same ability in the NUnit framework?
Upvotes: 0
Views: 1291
Reputation: 8725
In NUnit 3 TestContext has the capability to write messages.
Before NUnit 3, TestContext used to supply information (name, status, etc.)
Note:
NUnit 3 is currently in beta!
Upvotes: 3