πŸ§ͺ ANT MCQ Quiz Hub

ANT Mcq

Choose a topic to test your knowledge and improve your ANT skills

Mocks are Trojan horses because they replace real ___________ from the inside, without the calling classes being aware of it.





βœ… Correct Answer: 2

When we’re talking about mock objects, a/an _________ is a feature built into the mock that verifies whether the external class calling this mock has the correct behavior.





βœ… Correct Answer: 1

EasyMock relies heavily on the __________import feature of Java.





βœ… Correct Answer: 2

To use the createMock method of EasyMock we need to import ___________





βœ… Correct Answer: 1

__________ method creates a mock object that implements the given interface, order checking is enabled by default.





βœ… Correct Answer: 4

__________ 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.





βœ… Correct Answer: 2

__________________ creates a mock object, of the requested type and name which are passed, which also has implementations of the given interface or extends the given class.





βœ… Correct Answer: 4

_____________ creates a mock object that implements the given interface with the specification is that order checking is disabled by default.





βœ… Correct Answer: 3

createMock(String name, Class<T> toMock) throws _________________ exception.





βœ… Correct Answer: 2

________________ creates a mock builder allowing to create a partial mock for the given class or interface.





βœ… Correct Answer: 1

The ____________ interface is used in the creation of partial mocks with EasyMock. a) IMockBuilder<T> b) IMocker<T> c) IBuilder<T>expect(T value) d) MockBuilder<T>





βœ… Correct Answer: 1

____________ creates a control of the requested type.





βœ… Correct Answer: 2

_____________ returns the expectation setter for the last expected invocation in the current thread.





βœ… Correct Answer: 4

The _______________ interface decides whether an actual argument is accepted.





βœ… Correct Answer: 4

. The __________ interface allows setting expectations for an associated expected invocation.





βœ… Correct Answer: 2

____________ function expect the last invocation any times.





βœ… Correct Answer: 3

_____________ sets stub behavior for the expected invocation.





βœ… Correct Answer: 4

_______________ expect the last invocation between min and max times.





βœ… Correct Answer: 2

5. ____________ expect the last invocation a specified number of times.





βœ… Correct Answer: 1

_____________ sets a stub object that will be used for the calculation of the answer for the expected invocation.





βœ… Correct Answer: 3

_______________ sets a stub object implementing the same interface as the mock.





βœ… Correct Answer: 4

____________ records a call but returns nothing.





βœ… Correct Answer: 1

_____________ expects the last invocation once.





βœ… Correct Answer: 3

______________ sets a return value that will be returned for the expected invocation.





βœ… Correct Answer: 1