How Do I: Generate Types and Members in Source Code for Test Driven Development?
About This Video:
In this video Chris Pels shows how to use the Generate from Usage feature to generate types and members when writing unit tests for test driven development. First a test project is created and an instance of the Customer class, which does not exist. A class stub is generated in the test project from the instance code using the Generate from Usage feature. Next, a separate class library project is created and the Customer class is generated in the class library using the Generate Type option. Following this, properties, methods, and class constructors are added to the test project and their code generated in the Customer class in the class library. Finally, there is a discussion about how to use the Generate from Usage features outside of test driven development.Version: Visual Studio 2010.
Presented by: Chris Pels