Learn common patterns and strategies to effectively unit test your code in C#. We’ll go over design principles and ways to effectively ensure your code can be easily tested as well as how to use common testing tools such as Moq, Autofixture, & MsTest to help remove some of the drudgery of testing.
Testable code is a widely advocated industry standard but the barrier to entry is incredibly high. In this talk, we’ll go over not just how to unit test your code using MsTest, Moq, & AutoFixture but the patterns & processes to ensure your code can be unit tested. We will touch on the basics of dependency injection and common patterns such as avoiding the use of static classes but also more advanced topics such as SOLID design principles and how they relate to testing.
We’ll give the attendees a wide variety of examples on how to test common C# projects such as web api and console applications and different scenarios such as how to test databases and external method calls. Many real world tips & tricks on dealing with common patterns and scenarios will be included to make your life easier. Most importantly, attendees will be given a good idea of how to start testing, how to measure the effectiveness of their tests, and what not to test.