How to unit test code that requires user input c#
问题 its my first time doing unit tests/integration tests and I have a question. So I started doing unit tests for my code, but I have a method, which is actually the logic of the whole application, where multiple methods are called, and user input is required. How can I test that method? Here is the method: public async Task RunAsync() { var watch = System.Diagnostics.Stopwatch.StartNew(); var playAgain = 'y'; do { var attempts = 1; var foundNumber = false; while (attempts < 10 && foundNumber ==