Software

How Do I: Generate Types and Members in Source Code for Test Driven Development?

Date Added: Nov 2010
Format: Podcast

In this podcast the speaker talks about 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.