3 ms·
> If you can't monkey-patch the getDate function with a mock in a testing context because your language won't allow it, that's a language smell, not a pattern s
by surgical_fire 1y ago
> If you can't monkey-patch the getDate function with a mock in a testing context because your language won't allow it, that's a language smell, not a pattern smell.
Of course you can do it in Java. But it is widely considered poor practice, for good reason, and is generally avoided.
- shadowgovt 1y agoInteresting. Why is it considered poor practice to monkey-patch getDate for testing purposes in Java?