Third Zhou (i) vs installation and Unit test exercises

Source: Internet
Author: User

Third Zhou (i)

Requirements: Practice textbook 22nd to 25th page Unit test exercise, require self-installed Visual Studio development platform, version at least 2010, the requirements of the program installation process and the practice process to write to the blog, the more detailed the better, to be illustrated, no book students can to the class of students to borrow.

1.visual Studio Development Platform Installation

In fact, I do not know much about Visual Studio, only know the supported programming languages are many, with a lot of people, very powerful. As to what is good, or to use a burst of their own experience to know. Listen to the classmate said VS2015 some cards, so here I chose VS2013.

, the specific version is Visual Studio Ultimate with Updata 4 (actually I made it up, it should be called this), here I did not join the Visual Studio Experience Improvement Program before the tick, In fact, a lot of software in the installation time have similar this option, are adding a lot of improvement plans and so on, I do not know exactly what to do, I only know if the choice, there will be any upload error report and so on. Bla bla ... Very annoying.

Here the installation function I was the default check, and looked at the two did not choose the same as I do not really use

Start the installation, it feels like waiting for a long time.

After the installation is complete, the theme I chose is black (perhaps because the movies I see are written in black background ...). After the first go in, see this start page, feel a little dazzled, a little do not know where to start.

2. Unit Test Exercises

First find the Unit Test generator download and install in the online search, extensions and updates, tools.

Then create a new project visual C#-> class library

After creating the test code on the book, enter the following:

Namespace DemoUser
{
public class User
{
Public User (String useremail)
{
M_email = UserEmail;
}
private string M_email;
}
}

Then right-click the user class, find the Generator Unit Test, and then bounce out the box point to be OK.

At this point, VS automatically creates a new class library for testing, with TestClass and TestMethod, and the code on the book is entered in TestMethod Usertext:

String useremail= "[email protected]";

User Target=new User (useremail);

Assert.istrue (Target!=null);

After that, you find Test Explorer, Window Hole, test. You can see a window with a test explorer on the left side of the interface (also possible on the right)

Last run, you can find the results in the test Explorer:

The time used here will vary depending on the configuration of the PC, but the gap is small.

Third Zhou (i) vs installation and Unit test exercises

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.