Write [Java] [UT] [Mock] [JUnit] unit testing

Recently a new project to use a lot of unit tests, unit tests for understanding how a break.

Write down the outline, write articles summarize the experience points behind.

1. The test unit external to isolate cognate pairs

2. Mock, usage of timing differences spy

3. JUnit 4, 5 for the same sort of a class different mothod

4. JUnit test case of the packet (to be investigated)

Guess you like

Origin www.cnblogs.com/vincentmylee/p/ut.html