Hacker News new | ask | show | jobs
by ivanche 1641 days ago
I'm interested in your proposal for an alternative. Service Locator? New operator everywhere, used at-will? Something else?
1 comments

Allow all properties and methods to be get/set/called freely by the test harness (such as JUnit in Java's case), as if they were public all along. The need for DI in testing would be greatly reduced, while keeping the public/private distinction intact while the code is running as normal.