Prevent stubbing of equals method

前端 未结 3 1083
無奈伤痛
無奈伤痛 2020-12-11 01:57

I would like to test my class\' equals() method but Mockito seems to be calling the stub version every time. My test is as follows;

PluginResourceAdapter ada         


        
3条回答
  •  再見小時候
    2020-12-11 02:16

    If you want to test the real equals then you need to create a real object and call the equals method on it. I'm not sure why you are using mocks.

提交回复
热议问题