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

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -