The document discusses dependency injection (DI) using RoboGuice in Android applications. DI makes code more concise, modular, and easier to test by allowing classes to declare dependencies without knowing how they are satisfied. RoboGuice uses annotations to inject dependencies into activities and services. It allows for loose coupling, high cohesion, and centralized configuration through bindings. DI improves testability by increasing controllability, observability, and isolation of units under test.
22. We get:
● loose coupling
● high coherence
● centralized wiring
● centralized configuration
23. Testability (see wikipedia)
● controllability: The degree to which it is possible to control the state of the
component under test (CUT) as required for testing.
● observability: The degree to which it is possible to observe (intermediate
and final) test results.
● isolateability: The degree to which the CUT can be tested in isolation.
● separation of concerns: The degree to which the CUT has a single,
well defined responsibility.
● understandability: The degree to which the CUT is documented or
self-explaining.
● automatability: The degree to which it is possible to automate testing of
the CUT.
● heterogeneity: The degree to which the use of diverse technologies
requires to use diverse test methods and tools in parallel.