March 2018
Intermediate to advanced
276 pages
7h 11m
English
Before you apply a splinter refactoring you have to ensure that you won’t break the behavior of the code. Unfortunately, most hotspots lack adequate test coverage and writing unit tests for a hotspot is often impossible until we’ve refactored the code. Let’s look at an example from the Android codebase that we discussed earlier.
As you see in the figure, there’s a big difference in the amount of application code in Android’s core package versus the amount of test code in the test package.

That figure should put fear into any programmer planning a refactoring, because the unit test for the main hotspot, ActivityManagerService.java ...
Read now
Unlock full access