samedi 5 septembre 2015

Mockito Mock a method call being called inside tested class

I am trying to test ClassA, the test method calls a private function in this class, privateA. privateA calls another class classB's public function publicB.

Now i wish to mock publicB function using when,thenReturn. It shows error : org.mockito.exceptions.misusing.InvalidUseOfMatchersException:

Any helps, is this allowed ?

Aucun commentaire:

Enregistrer un commentaire