Object-oriented unit test --Java base (9)

Unit testing: mainly provides developers use Objective: To improve the quality of development.

Create a unit test steps:

     1, create a test class

     2 , create a test method, the test method and then add @Test

     3, introduced junit test pack: Import org.junit.Test ;

     4, asserted that the judgment result of the test. import org.junit.Assert;

 

 

Guess you like

Origin www.cnblogs.com/Unlimited-Rain/p/12465810.html