The Fundamentals of Unit Testing

By now you have heard of unit tests. Perhaps you have read an article about them or watched a video. Maybe you have even tried to write a few yourself, but the whole unit testing “thing” has not quite hit home yet. Maybe you have been put off by the Testinistas or your company thinks unit tests are just a bunch of extra code. No matter where you are on this spectrum, if you are not writing unit tests as part of your daily coding, then this talk is for you. In this introduction, we will discuss the value of unit tests. You will learn some practical techniques you can use to start to make unit testing part of your daily routine. After our introduction, we will look at more advanced topics such as mocking and Test Driven Development (TDD). We’ll finish our discussion by looking at Microsoft Fakes and discussing how to test legacy software.

Joel Cochran

Joel Cochran is currently serving as a Technical Evangelist on the Microsoft Civic Technology Services team. Joel was born in Virginia, grew up in Iowa, and graduated from James Madison University in Harrisonburg, VA. After serving in the United States Army, he moved to Florida where he fell backwards into a job at a software company. Before long he was a software developer on the IBM AS/400 platform. After moving back to Virginia a few years later, he worked for a micro-ISV writing software for local governments. This period led him through a wide range of technologies such as RPG, DB2, Java, Perl, PHP, MySQL, Linux, and more. In 2003, Joel discovered C#, .NET, and SQL Server, and has been dedicated to the Microsoft stack ever since. Over the years he has ranged through a variety of web, desktop, and database development tools and environments. An accomplished writer and speaker, Joel loves to teach and was a 6-time Microsoft MVP prior to joining the company. He lives in Harrisonburg, VA, with his family, and is an avid pool player.