Search code examples
unit-testingjunitstubjmockitstubbing

Is it correct to pass two classes as arguments in NonStrictExpectations in JMockit?


Can we pass more than two class aruments in NonStrictExpectations. Like this

NonStrictExpcetations(A.class, B.class)

Solution

  • Yes, no problem. Each class passed in will cause it to be partially mocked according to the expectations recorded inside the block.