mockito - How to write junits for anonymous inner class? -
i have searched writing junits anonymous inner class, cannot find solution. there simple example writing junits anonymous inner class using mockito?
an anonymous inner class implementation detail, don't try , "write test it".
instead write test describes behaviour of class uses inner class. should possible exercise code of inner class parent's public interface, otherwise why code there?
should ever wish change implementation of functionality test support in making change. if somehow "tested inner class" need rewrite test , make job harder rather easier.
Comments
Post a Comment