1.

______________ sets stub behavior for the expected invocation.(a) andStubReturn(T value)(b) andThrow(Throwable throwable)(c) anyTimes()(d) asStub()This question was addressed to me in a national level competition.My question is based upon Putting Ant to The Task topic in chapter Running JUnit Tests from Ant of JUnit

Answer»

The CORRECT option is (d) asStub()

To ELABORATE: Setting the stub BEHAVIOR is NEEDED for void methods.



Discussion

No Comment Found

Related InterviewSolutions