15 Test Doubles questions from the Testing bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.a stand-in object that returns hardcoded canned responses to calls made during a check
B.a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
C.a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
D.a working lightweight implementation, such as an in-memory database, used instead of the real one
Answer + AI explanation with Pro
2. Which term means: "a stand-in object that returns hardcoded canned responses to calls made during a check"?
Junior
A.Stub
B.Spy
C.Mock
D.Dummy
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.Stub — a placeholder object passed only to fill a parameter list, never actually used by the code under examination
B.Stub — a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
C.Stub — a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
D.Stub — a stand-in object that returns hardcoded canned responses to calls made during a check
Answer + AI explanation with Pro
4. What is Mock?
Mid
A.a placeholder object passed only to fill a parameter list, never actually used by the code under examination
B.a working lightweight implementation, such as an in-memory database, used instead of the real one
C.a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
D.a stand-in object that returns hardcoded canned responses to calls made during a check
Answer + AI explanation with Pro
5. Which term means: "a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met"?
Mid
A.Stub
B.Mock
C.Fake
D.Spy
Answer + AI explanation with Pro
6. Which statement is correct?
Mid
A.Mock — a placeholder object passed only to fill a parameter list, never actually used by the code under examination
B.Mock — a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
C.Mock — a working lightweight implementation, such as an in-memory database, used instead of the real one
D.Mock — a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
Answer + AI explanation with Pro
7. What is Fake?
Mid
A.a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
B.a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
C.a stand-in object that returns hardcoded canned responses to calls made during a check
D.a working lightweight implementation, such as an in-memory database, used instead of the real one
Answer + AI explanation with Pro
8. Which term means: "a working lightweight implementation, such as an in-memory database, used instead of the real one"?
Mid
A.Mock
B.Stub
C.Fake
D.Dummy
Answer + AI explanation with Pro
9. Which statement is correct?
Mid
A.Fake — a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
B.Fake — a stand-in object that returns hardcoded canned responses to calls made during a check
C.Fake — a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
D.Fake — a working lightweight implementation, such as an in-memory database, used instead of the real one
Answer + AI explanation with Pro
10. What is Spy?
Junior
A.a placeholder object passed only to fill a parameter list, never actually used by the code under examination
B.a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
C.a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
D.a stand-in object that returns hardcoded canned responses to calls made during a check
Answer + AI explanation with Pro
11. Which term means: "a wrapper that records how a real or substitute object was called so the calls can be asserted afterward"?
Junior
A.Stub
B.Spy
C.Fake
D.Mock
Answer + AI explanation with Pro
12. Which statement is correct?
Junior
A.Spy — a placeholder object passed only to fill a parameter list, never actually used by the code under examination
B.Spy — a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
C.Spy — a stand-in object that returns hardcoded canned responses to calls made during a check
D.Spy — a working lightweight implementation, such as an in-memory database, used instead of the real one
Answer + AI explanation with Pro
13. What is Dummy?
Junior
A.a programmable substitute pre-loaded with expectations about which calls it should receive, failing if they are not met
B.a placeholder object passed only to fill a parameter list, never actually used by the code under examination
C.a working lightweight implementation, such as an in-memory database, used instead of the real one
D.a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
Answer + AI explanation with Pro
14. Which term means: "a placeholder object passed only to fill a parameter list, never actually used by the code under examination"?
Junior
A.Dummy
B.Fake
C.Spy
D.Stub
Answer + AI explanation with Pro
15. Which statement is correct?
Junior
A.Dummy — a placeholder object passed only to fill a parameter list, never actually used by the code under examination
B.Dummy — a working lightweight implementation, such as an in-memory database, used instead of the real one
C.Dummy — a stand-in object that returns hardcoded canned responses to calls made during a check
D.Dummy — a wrapper that records how a real or substitute object was called so the calls can be asserted afterward
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Test Doubles question come with Pro.