Recall & Review
beginner
What is a dummy object in software testing?
A dummy object is a simple placeholder used in tests to fill parameter lists or satisfy method signatures without affecting the test outcome.
Click to reveal answer
beginner
Why do we use dummy objects in unit tests?
We use dummy objects to avoid null values and to satisfy method parameters when the actual object is not needed for the test logic.
Click to reveal answer
intermediate
How is a dummy object different from a mock object?
A dummy object is just a placeholder and does not have behavior, while a mock object simulates behavior and can verify interactions.
Click to reveal answer
beginner
Example of creating a dummy object in JUnit tests?
In JUnit, you can create a dummy object by instantiating a simple class or using a mock library to create an object that is not used in assertions.Click to reveal answer
intermediate
When should you avoid using dummy objects?
Avoid dummy objects when the test requires real behavior or interaction; use mocks or stubs instead to simulate behavior.
Click to reveal answer
What is the main purpose of a dummy object in testing?
✗ Incorrect
Dummy objects are used only to fill parameters and do not affect the test logic.
Which of the following is NOT true about dummy objects?
✗ Incorrect
Dummy objects do not verify interactions; that is the role of mocks.
In JUnit, how can you create a dummy object?
✗ Incorrect
A dummy object can be a simple instance with no logic just to fill parameters.
When should you NOT use a dummy object?
✗ Incorrect
If behavior simulation is needed, use mocks or stubs, not dummy objects.
Which test double is a dummy object closest to?
✗ Incorrect
Dummy objects are simple placeholders without behavior, unlike mocks, stubs, or fakes.
Explain what a dummy object is and why it is useful in unit testing.
Think about objects that just fill space in method calls.
You got /4 concepts.
Describe the difference between dummy objects and mocks in testing.
Compare their roles in test logic and verification.
You got /4 concepts.