JUnit Framework features detailed--junit learning (i)

Source: Internet
Author: User

Catalog [-] A simple junit junit life cycle using @runwith annotations to be continued

is a well-known unit testing framework in which all test cases in JUNIT4 use @annotation labeling, which provides greater flexibility than JUnit3 through class inheritance and specific method names. After spending more than a week learning JUNIT4 and using the original code, I found that I used only the basic functions of junit, ignoring the many powerful features of JUnit. Here you can record and share the new JUnit world you've discovered (these features may have been used by many friends:>), and the following series of articles will describe the highlights of the process of learning the JUnit source code.

a simple JUnit first defines a person's interface to describe a number of behaviors of a human being, and the following expands the test for people. The interface is defined as follows, and the defined behavior includes getting age, getting a name, talking to it, and walking.

1 2 3 4 5 6 7 8 9 10 11 Public interface Person {public int getage ();            Public String getName (); public string Talkto (String message);

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.