mardi 1 mars 2016

Verify static call on partially mocked / stubbed class

I wish to verify a static call. Usually its not a problem, i just mock the class, call verifyStatic and call the static method.

mockStatic(MyStatic.class);
verifyStatic();
MyStatic.myMethod();

But the problem this time is I cant mock MyStatic because i still need to use some of the other methods there. Is it still possible to verify a static method call without mocking the whole class?

Aucun commentaire:

Enregistrer un commentaire