I have a system like, it reads data from a source and does some processing and writes its information to database and a file.Is it possible to check method invocation with certain parameters without creating its mock? I know it can be done via Mockito, but it works on mock objects only, not real objects. In this situation, I cannot create mock of all classes used as there are lot classes of different libraries is used internally.
e.g. It is happening internally
obj.insert(Class1 param1,Class2 param2);
I want to check it like this
verify(obj,times(12)).insert(any(),any());
but obj should be Mock object to check this way, not real.
Aucun commentaire:
Enregistrer un commentaire