Introduction
How to test-driven development in Visual Studio 2008
Background
In Agile development, the test driver is an important part. This example demonstrates how to use Visual Studio 2008 for the test driver.
How to Use
First open Visual Studio to create a test project
Next, write down the encoding and execute this encoding to generate an orz object, and call the Add function to input two parameters (2, 3). Then call the result property to determine the result. Because the orz object has not been created, compilation fails.
Next, create an orz object and compile it.
Similarly, the compiler notifies you of errors.
Next, declare add and result, and compile
This discovery can be executed, but the test has not passed
Because I have not implemented add and Result
Finally, I will execute the ADD and result tests. This is a simple test-driven example. The written test code is used to construct the object.