Message-ID: <1033168372.2369.1427695183357.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_2368_1258282033.1427695183357" ------=_Part_2368_1258282033.1427695183357 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
When Ashcroft fails a test, you will see that the recommended so= lution often involves a refactoring towards dependency injection. Fine, tha= t (with the aid of Mock Objects will= allow you to test your class in isolation. But what about integration test= s? Or even the whole application? How do you assemble the real classes (including these low level ones) that actually do access files, sockets, threads and graphics environments?=20
There are several ways. You can do it manually in some bootstrap class, = or you can use PicoContainer/NanoContainer or some other DI framework such = as Spring or HiveMind. It's up to you. These frameworks will make that asse= mbly easy, as long as your classes honour DI.