[. Net] Test-driven development

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.