Summary
In this chapter, we learned about some tools and techniques to unit test .NET projects that contain different multithreaded constructs. We started by discussing the best methods for testing C# code that employs async
/await
. This will be common in modern applications, and it is important to have a suite of automated unit tests covering your async
code.
We also walked through some examples of unit tests that test methods that leverage parallel constructs and concurrent data structures. In the last section of the chapter, we learned about dotMemory Unit from JetBrains. This free unit testing tool adds the ability to detect objects leaked by methods under test. It is a powerful automation tool for synchronous and asynchronous .NET code.
This is the final chapter. Thanks for following along on this multithreading journey. Hopefully, you didn’t encounter any deadlocks or race conditions along the way. This book provided guidance for your path through the modern, multithreaded...