1.

___________ is used for the creation of a mock object, with the specification of it being of the requested type, which has implementations of the given interface or extends the given class.(a) createMock(Class toMock)(b) createMock(MockType type, Class toMock)(c) createMock(String name, ClasstoMock)(d) createMock(String name, MockType type, ClasstoMock)The question was asked in an internship interview.This intriguing question comes from Ant in division Running JUnit Tests from Ant of JUnit

Answer»

Correct choice is (b) createMock(MockType type, CLASS toMock)

EASY explanation: createMock(MockType type, Class toMock) is the OLD version of MOCK(MockType, Class), which is more completion FRIENDLY.



Discussion

No Comment Found

Related InterviewSolutions