Course Catalog
Curriculum Guides
Buy Courseware
Technical Library
About Object Innovations
Contact Us

877-558-7246 (toll free)  

4107. Advanced Test-Driven Development Using Visual Studio and C#

Rev. 4.5


An emerging software engineering paradigm is test-driven development, where tests are written early and testing is performed continuously during the development process. Problems are discovered early and corrected when they are found. This one-day course for developers introduces advanced tools and methodologies of test-driven development that come with Visual Studio 2012 Ultimate, and illustrates the use of the techniques in the real-life projects.


The course is practical, with many example programs and tests written in C#, including a cumulative case study. The goal is to demonstrate unit testing in real world .NET development projects including tiered service-oriented applications. The student will receive a comprehensive set of materials, including course notes and all the programming examples.




         Understand Code Coverage tools and metrics

         Acquire fluency in code isolation techniques

         Efficiently use Microsoft Fakes framework for code isolation


Duration: 1 day.


Prerequisites: The student should have a good knowledge of the .NET Framework and experience programming in C# with Visual Studio. A basic course in Unit Testing, such as the Object Innovations course 4106, Test-Driven Development Using Visual Studio and C#, is recommended.


1.      Code Coverage


Block Coverage

Branch Coverage

Line Coverage

Collecting Coverage Data

Selecting Coverage Units

Coverage Visualization

Coverage Analysis


2.      Isolation Techniques

Design for Test

Private Accessors

Test Instance

Configuration Files

Test Instance - Database

Test Instance - Service



3.      Microsoft Fakes

Adding Fakes

Stub Classes

Stub Methods

Stub Properties


Shims Context

Class Shims

Methods Shims

Default Behavior

Global Shims

Static Methods


System Requirements


Course exercises require Visual Studio 2012 Ultimate and a Windows 7 SP1 operating system, or more recent.


A good minimal hardware profile for this course would have a 1.8 GHz or equivalent CPU, 2 GB of RAM, and at least 10 GB of free disk space for tools installation and courseware.