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); |