createMock(String name, Class<T> toMock) throws _________________ exception.
1.IndexOutOfBounds
2.IllegalArgumentException
3.NullPointer
4.Arithmetic
Mocks are Trojan horses because they replace real ___________ from the inside, without the calling classes being aware of it.
1.Methods
2.Objects
3.Variables
4.Classes
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>
1. IMockBuilder<T>
2.IMocker<T>
3. IBuilder<T>expect(T value)
4. MockBuilder<T>
The _______________ interface decides whether an actual argument is accepted.
1.IMockBuilder<T>
2. IMocker<T>
3.IBuilder<T>expect(T value)
4.IArgumentMatcher
_______________ expect the last invocation between min and max times.
1.times(int count)
2.times(int min, int max)
3.once()
4. asStub()
. The __________ interface allows setting expectations for an associated expected invocation.
1.IMocksControl
2.IExpectationSetters<T>
3.IExpectation<T>
4.Isetters<T>
5. ____________ expect the last invocation a specified number of times.
1. times(int count)
2.times(int min, int max)
3.once()
4.asStub()
EasyMock relies heavily on the __________import feature of Java.
1.Dynamic
2.Static
3.Class
4.Object
To use the createMock method of EasyMock we need to import ___________
1.org.easymock.EasyMock.createMock
2.org.EasyMock.createMock
3. org.easymock.createMock
4.org.createMock
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.
1.Expectation
2.Explanation
3.Behavior
4.Amorous
__________ 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.
1.createMock(Class<T> toMock)
2.createMock(MockType type, Class<T> toMock)
3.createMock(String name, Class<T>toMock)
4.createMock(String name, MockType type, Class<T>toMock)
__________ method creates a mock object that implements the given interface, order checking is enabled by default.
1.createNiceControl
2.createMockBuilder
3.createNiceMock
4.createStrictMock
____________ creates a control of the requested type.
1. createControl()
2.createControl(MockType type)
3.createNiceControl()
4. createNiceMock(Class<T> toMock)
____________ function expect the last invocation any times.
1.andStubReturn(T value)
2.andThrow(Throwable throwable)
3.anyTimes()
4.asStub()
____________ records a call but returns nothing.
1.andVoid()
2.times(int min, int max)
3.once()
4.asStub()
_____________ creates a mock object that implements the given interface with the specification is that order checking is disabled by default.
1.createMock(Class<T> toMock)
2.createMock(MockType type, Class<T>toMock)
3.createMock(String name, Class<T> toMock)
4.createMock(String name, MockType type, Class<T> toMock)
_____________ expects the last invocation once.
1.andVoid()
2. times(int min, int max)
3.once()
4.asStub()
_____________ returns the expectation setter for the last expected invocation in the current thread.
1.createControl()
2.createControl(MockType type)
3.createNiceControl()
4.expect(T value)
_____________ sets a stub object that will be used for the calculation of the answer for the expected invocation.
1.andAnswer(IAnswer<? extends T>answer)
2.andDelegateTo(Object delegateTo)
3.andStubAnswer(IAnswer<? extends T> answer)
4.andThrow(Throwable throwable)
_____________ sets stub behavior for the expected invocation.
1.andStubReturn(T value)
2.andThrow(Throwable throwable)
3.anyTimes()
4.asStub()
______________ sets a return value that will be returned for the expected invocation.
1.andReturn(T value)
2.times(int min, int max)
3.once()
4.asStub()
_______________ sets a stub object implementing the same interface as the mock.
1.andAnswer(IAnswer<? extends T> answer)
2.andDelegateTo(Object delegateTo)
3.andStubAnswer(IAnswer<? extends T> answer)
4. andStubDelegateTo(Object delegateTo)
________________ creates a mock builder allowing to create a partial mock for the given class or interface.
1.createMockBuilder(Class<T> toMock)
2.createMock(Class<T> toMock)
3.createNiceControl()
4.createNiceMock(Class<T> toMock)
__________________ 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.
1.createMock(Class <T> toMock)
2.createMock(MockType type, Class<T> toMock)
3.createMock(String name, Class<T> toMock)
4.createMock(String name, MockType type, Class<T> toMock)