Inside_Android_Testing icon indicating copy to clipboard operation
Inside_Android_Testing copied to clipboard

ArgumentCaptor captures caller instead of interface class

Open CazimirRoman opened this issue 7 years ago • 0 comments

Hi Fernando,

Thank you for your tutorial. It is really helpfull for me and got me started writing my first unit test for my android applications. I have one problem though which is described in this stackoverflow post: https://stackoverflow.com/questions/51797291/argumentcaptor-captures-wrong-class

Basically where you have dummyCallbackArgumentCaptor.getValue().onSuccess(results);, I get the dummyCaller as a response to dummyCallbackArgumentCaptor.getValue(), so naturally i cannot call onSucess(results) on it. As i write these lines I got an idea to actually clone your repository and see if I am getting the tests to pass...

CazimirRoman avatar Aug 15 '18 17:08 CazimirRoman