Reputation: 672
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.
Upvotes: 0
Views: 47
Reputation: 306
You can use PowerMock. It allows you to mock static methods and contructors to return mocked objects (and more).
Upvotes: 1