A Definition of the class:
First create a project called F , define the Triangle class under the project , judge the triangle
Two JUnit Project Introduction
1. Introduce the JUnit unit test package to this project: on the project, right click on "Properties" to generate the following:
2 Select "java Build Path" First, then "libraries",then "Add Library ... " on the right. "
3 in the New Popup dialog box, select "JUnit", click Next, select Junit4 in the dialog box , click " Finish",the JUNIT4 software package is included in the F project.
Three
Generate the junit test framework and Select "junit test Case" in MyEclipse's file->new , set up a test1 class that holds the test code
Four Test code Results
(1) test result is isosceles triangle
(2) test result is equilateral triangle
(3) The test result is a normal triangle
4. The test result does not constitute a triangle
Five Record the time of each stage
Program plan:20%
Program Design:30%
Program code:30%
Program test:20%
Java uses JUnit to do unit testing