Easier Unit Testing using Mocking
Presented by: Bruce Johnson (Principal Consultant with ObjectSharp)
Writing unit tests for simple code is relatively easy to do. However, one of the main impediments to having a more complete test coverage is how difficult certain cases are to test. The solution, in most cases, is utilize mocking, either manually or through a mocking framework. Even better, a good mocking framework can help you test scenarios that are currently impossible to test on an automated basis.
In this session, how unit testing and mocking work together will be discussed, with the bulk of the time spent looking at how common unit testing scenarios can be implemented. The framework of choice for the session is Moq, but all of the popular (and freely-available) mocking frameworks support the functionality being covered.
Bruce Johnson is a Principal Consultant with ObjectSharp and a 30-year veteran of the computer industry. While he includes UNIX in his long distant past, the past 15 years have been spent on projects at the leading edge of Windows technology, including using .NET since the introduction of version 1.0.
His experience includes the creation of commercial web applications using AJAX, the implementation of numerous service-based architectures and the building of various Windows-based applications for software vendors. As well as his experience in system design and development, he has written a bi-monthly technology column (for six years), has been published in a wide variety of technology periodicals, has given over 200 presentations at user conferences all over North America and has co-authored five books for Microsoft Press and Wrox.
Blog: ObjectSharp Blog