MCQOPTIONS
Saved Bookmarks
This section includes 14 Mcqs, each offering curated multiple-choice questions to sharpen your Junit knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Stubs test the behavior of faked objects. |
| A. | True |
| B. | False |
| Answer» C. | |
| 2. |
Stubs work well to ________ a given class for testing and asserting the state of its instances. |
| A. | Delete |
| B. | Enhance |
| C. | Isolate |
| D. | Append |
| Answer» D. Append | |
| 3. |
A __________ offers services for the components it’s hosting, such as lifecycle, security, transaction, distribution, and so forth. |
| A. | Component |
| B. | Container |
| C. | Mock |
| D. | Appraisal |
| Answer» C. Mock | |
| 4. |
____________ translates ExpectationErrors into JUnit’s AssertionFailedErrors. |
| A. | JUnit3ErrorTranslator |
| B. | JUnit3Mockery |
| C. | MockObjectTestCase |
| D. | VerifyingTestCase |
| Answer» B. JUnit3Mockery | |
| 5. |
STUBS_WORK_WELL_TO__________A_GIVEN_CLASS_FOR_TESTING_AND_ASSERTING_THE_STATE_OF_ITS_INSTANCES.?$ |
| A. | Delete |
| B. | Enhance |
| C. | Isolate |
| D. | Append |
| Answer» D. Append | |
| 6. |
Stubs_test_the_behavior_of_faked_objects.$ |
| A. | True |
| B. | False |
| Answer» C. | |
| 7. |
A __________ offers services for the components it’s hosting, such as lifecycle, security, transaction, distribution, and so forth?# |
| A. | Component |
| B. | Container |
| C. | Mock |
| D. | Appraisal |
| Answer» C. Mock | |
| 8. |
The __________ class provides factory methods for the executor services provided in the package. |
| A. | Executors |
| B. | Exceptions |
| C. | ReadOnly |
| D. | AbstractMock |
| Answer» B. Exceptions | |
| 9. |
A _________ is a JUnit Rule that manages JMock expectations and allowances. |
| A. | JunitRuleMockery |
| B. | JmockRuleMockery |
| C. | JunitRule |
| D. | JunitMockery |
| Answer» B. JmockRuleMockery | |
| 10. |
To write a mock object test in JUnit 3, MockObject needs to be extended. |
| A. | True |
| B. | False |
| Answer» C. | |
| 11. |
____________ is a TestCase that verifies postconditions after the test has run and before the fixture has been torn down. |
| A. | JUnit3ErrorTranslator |
| B. | JUnit3Mockery |
| C. | MockObjectTestCase |
| D. | VerifyingTestCase |
| Answer» B. JUnit3Mockery | |
| 12. |
__________ is a TestCase that supports testing with mock objects. |
| A. | JUnit3ErrorTranslator |
| B. | JUnit3Mockery |
| C. | MockObjectTestCase |
| D. | VerifyingTestCase |
| Answer» B. JUnit3Mockery | |
| 13. |
___________ is a Mockery that reports expectation errors as JUnit 3 test failures. |
| A. | JUnit3ErrorTranslator |
| B. | JUnit3Mockery |
| C. | MockObjectTestCase |
| D. | VerifyingTestCase |
| Answer» B. JUnit3Mockery | |
| 14. |
____________ translates ExpectationErrors into JUnit’s AssertionFailedErrors. |
| A. | JUnit3ErrorTranslator |
| B. | JUnit3Mockery |
| C. | MockObjectTestCase |
| D. | VerifyingTestCase |
| Answer» B. JUnit3Mockery | |