1.

What Should I Do If I Want To Make Sure That A Particular Method Of A Class Is Getting Called?

Answer»

If its a static METHOD of the class , we can use verify to make sure it's GETTING called.

If its an instance method , We can MOCK the object and then use verify with the MOCKED object to make sure that the method is getting called."

If its a static method of the class , we can use verify to make sure it's getting called.

If its an instance method , We can mock the object and then use verify with the mocked object to make sure that the method is getting called."



Discussion

No Comment Found