In a previous blog post, I've shown how the programmatic MockDataProvider can be used to mock the entire JDBC API through a single functional interface: // context contains the SQL string and bind variables, etc. MockDataProvider provider = context -> { // This defines the update counts, result sets, etc. // depending on the context … Continue reading Mocking JDBC Using a Set of SQL String / Result Pairs
Tag: Testing
Static, Non-Static. Mockable, Non-Mockable… Instead, Let’s Focus on Real Added Value…
The never ending topic of testability... Dogmatic discussions about stuff being static, non-static. Mockable, non-mockable. Testable, non-testable. Here's an article that was recently syndicated on DZone, about the evilness in making things static: http://java.dzone.com/articles/why-static-bad-and-how-avoid While the article itself is still somewhat focused on simple means of making something mockable through dependency injection, the big lot … Continue reading Static, Non-Static. Mockable, Non-Mockable… Instead, Let’s Focus on Real Added Value…