I recently needed to write test progress to the console with NUnit. The task we want to solve here is basically the TODO part of this snippet:
The title picture of this article shows the end result. If you want to know the solution, keep reading 🙂
Become a better .NET full stack web developer
I recently needed to write test progress to the console with NUnit. The task we want to solve here is basically the TODO part of this snippet:
| [TestFixture] | |
| public class MyTests | |
| { | |
| [Test] | |
| public void SampleTest() | |
| { | |
| // some operations here, like starting a server for tests in-memory… | |
| // TODO: inform the 'user' (the one who runs the test) that the server is already running | |
| while (true) | |
| { | |
| // keep it running on purpose (e.g. for E2E tests) | |
| } | |
| } | |
| } |
The title picture of this article shows the end result. If you want to know the solution, keep reading 🙂