Test-Driven Development Using Visual Studio and C# gives developers a one-day, practical introduction to the methodology. It also covers the unit testing framework built into Visual Studio 2013, including the free Express version. The morning starts by asking what TDD actually is, then separates functional and customer-facing tests from narrower unit and programmer tests. From there, it covers test automation, simple design, and refactoring. A Visual Studio test drive puts these ideas together against real C# code. A closing module then applies the same habits to legacy code that predates any test suite. Developers learn to write tests early and test continuously, catching and correcting problems sooner.
The afternoon turns to the Visual Studio unit testing framework itself: the structure of a unit test, assertions, test cases, and test classes. Attendees also work with test runners, learn to ignore tests selectively, and apply initialization and cleanup logic at both the test and class level. A closing block on expected exceptions and custom asserts leads into organizing and debugging suites with Playlists and MSTest. Students also take a second pass at refactoring once a working suite is in place. The course stays practical, with many example programs and a cumulative case study written in C#. Students receive a full set of materials, including course notes and all the programming examples.
Who Should Attend
Developers and Technical Managers
What Attendees Will Learn
Upon completing Test-Driven Development Using Visual Studio and C#, attendees will be able to:
- Explain the principles and practices of test-driven development
- Distinguish functional/customer tests from unit/programmer tests
- Apply simple design and refactoring techniques within a TDD workflow
- Develop fluency writing tests using the Visual Studio unit testing framework
- Use assertions, test classes, and test runners effectively
- Apply initialization and cleanup at the test and class level
- Debug and organize test suites using Playlists and MSTest
- Apply TDD techniques to legacy code
Prerequisites
The student should have a basic knowledge of the .NET Framework and experience programming in C# with Visual Studio.