Time allocation is to find information 60%, hands-on practice 40%. Because before has not much study hard, led to see the use of Gunit for unit testing when it feels like to see a line of symbols as at a loss, fortunately, search engine is very powerful, find the middle of the information to find a ready-made fool-style tutorial, so it is not so difficult to do it. But after the finished still did not learn how many things, missing is too many.
The first step is to register your GitHub account on the GitHub website.
The second step, in eclipse with JUNIT4 unit test, first create a new project Junit-test, and then write a calculate class, this is a can implement subtraction calculator class, there are some bugs in the class.
Then bring the JUNIT4 Unit test package into this project, right-click on the item and tap Properties. In the pop-up Properties window, first select Javabuildpath on the left, then select the libraries tag on the right, then on the far right click on the add Library ... button and then select Junit4 in the new pop-up dialog box and click OK, just fine.
Then in Eclipse's Packageexclope, right-click on the Class pop-up menu, select "New,ajunit Test", make a selection in the popup dialog and click Next, then modify the test code, a bit time-consuming. Finally, test the code. Step three, upload the code to GitHub,
Use GitHub for unit testing in eclipse