I have a class that I need to replace with a dummy class when I'm running tests. Is there a way to achieve this? I know product flavors offer something like this so I imagine this should be possible too.
1 Answer
You can use PowerMock. It allows you to mock static methods and contructors to return mocked objects (and more).
1 Comment
Naveen Dissanayake
So this is perfect for me but turns out if I include this I have to enable mulitdexing which sounds like a waste. Is there any other way to do this? Thanks either way.