MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Junit
Junit Assessment
Quiz 1
1
2
3
4
5
6
7
8
9
10
Q.1
The __________ interface allows setting expectations for an associated expected invocation.
a) IMocksControl
b) IExpectationSetters<T>
c) IExpectation<T>
d) Isetters<T>
Q.2
_____________ function expect the last invocation any times.
a) andStubReturn(T value)
b) andThrow(Throwable throwable)
c) anyTimes()
d) asStub()
Q.3
______________ sets stub behavior for the expected invocation.
a) andStubReturn(T value)
b) andThrow(Throwable throwable)
c) anyTimes()
d) asStub()
Q.4
_______________ expect the last invocation between min and max times.
a) times(int count)
b) times(int min, int max)
c) once()
d) asStub()
Q.5
____________ expect the last invocation a specified number of times.
a) times(int count)
b) times(int min, int max)
c) once()
d) asStub()
Q.6
_____________ sets a stub object that will be used for the calculation of the answer for the expected invocation.
a) andAnswer(IAnswer<? extends T>answer)
b) andDelegateTo(Object delegateTo)
c) andStubAnswer(IAnswer<? extends T> answer)
d) andThrow(Throwable throwable)
Q.7
_______________ sets a stub object implementing the same interface as the mock.
a) andAnswer(IAnswer<? extends T> answer)
b) andDelegateTo(Object delegateTo)
c) andStubAnswer(IAnswer<? extends T> answer)
d) andStubDelegateTo(Object delegateTo)
Q.8
_____________ records a call but returns nothing.
a) andVoid()
b) times(int min, int max)
c) once()
d) asStub()
Q.9
_____________ expects the last invocation once.
a) andVoid()
b) times(int min, int max)
c) once()
d) asStub()
Q.10
_______________ sets a return value that will be returned for the expected invocation.
a) andReturn(T value)
b) times(int min, int max)
c) once()
d) asStub()
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)