Good mocking advice from Naresh Jain, Mocking only Abstract Methods using Mockito (Partial Mocking). Note the trickiness of partial mocking in Mockito.
Saturday, December 07, 2013
Wednesday, December 04, 2013
10 Java dos and dont's
Nice list of 10 Java coding pratices from Data Geekery GmbH in Switzerland. These 10 are close to my programmer heart:
- Remember C++ destructors
- Don’t trust your early SPI evolution judgement
- Avoid returning anonymous, local, or inner classes
- Start writing [functional interface]s now!
- Avoid returning null from API methods
- Never return null arrays or lists from API methods
- Avoid state, be functional
- Short-circuit equals()
- Try to make methods final by default
- Avoid the method(T…) signature
Subscribe to:
Posts (Atom)