MCQOPTIONS
Saved Bookmarks
This section includes 17 Mcqs, each offering curated multiple-choice questions to sharpen your Junit knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
____________ class represents the context, or neighborhood, of the object(s) under test. |
| A. | Sequence |
| B. | States |
| C. | Expectations |
| D. | Mockery |
| Answer» E. | |
| 2. |
__________ is an interface which defines a state machine that is used to constrain the order of invocations. |
| A. | Sequence |
| B. | States |
| C. | Expectations |
| D. | Mockery |
| Answer» C. Expectations | |
| 3. |
___________ interface defines a sequence of expectations. |
| A. | Sequence |
| B. | States |
| C. | Expectations |
| D. | Mockery |
| Answer» B. States | |
| 4. |
__________ is a naming scheme in which the implicit name for a mock object is the mocked type’s name prepend with “mock”. |
| A. | RetroNamingScheme |
| B. | CamelCaseNamingScheme |
| C. | JavaReflectionImposteriser |
| D. | LastWordNamingScheme |
| Answer» B. CamelCaseNamingScheme | |
| 5. |
___________ is a naming scheme in which the implicit name for a mock object is the last word of the mocked type’s name in lower case. |
| A. | AssertionErrorTranslator |
| B. | CamelCaseNamingScheme |
| C. | JavaReflectionImposteriser |
| D. | LastWordNamingScheme |
| Answer» E. | |
| 6. |
__________ is an ExpectationErrorTranslator that doesn’t do any translation. |
| A. | AssertionErrorTranslator |
| B. | CamelCaseNamingScheme |
| C. | CurrentStateMatcher |
| D. | IdentityExpectationErrorTranslator |
| Answer» E. | |
| 7. |
_________ is a naming scheme wherein the implicit name for a mock object is the mocked type’s name with the first character represented in lower case. |
| A. | AssertionErrorTranslator |
| B. | CamelCaseNamingScheme |
| C. | CurrentStateMatcher |
| D. | IdentityExpectationErrorTranslator |
| Answer» C. CurrentStateMatcher | |
| 8. |
___________IS_AN_INTERFACE_WHICH_DEFINES_A_STATE_MACHINE_THAT_IS_USED_TO_CONSTRAIN_THE_ORDER_OF_INVOCATIONS.?$ |
| A. | Sequence |
| B. | States |
| C. | Expectations |
| D. | Mockery |
| Answer» C. Expectations | |
| 9. |
_____________class_represents_the_context,_or_neighborhood,_of_the_object(s)_under_test.$ |
| A. | Sequence |
| B. | States |
| C. | Expectations |
| D. | Mockery |
| Answer» E. | |
| 10. |
___________ interface defines a sequence of expectations? |
| A. | Sequence |
| B. | States |
| C. | Expectations |
| D. | Mockery |
| Answer» B. States | |
| 11. |
__________ function translates the given ExpectationError into an error type compatible with another testing framework. |
| A. | change() |
| B. | translate() |
| C. | compatible() |
| D. | mock() |
| Answer» C. compatible() | |
| 12. |
__________ is a naming scheme in which the implicit name for a mock object is the mocked type’s name prepend with “mock”.$ |
| A. | RetroNamingScheme |
| B. | CamelCaseNamingScheme |
| C. | JavaReflectionImposteriser |
| D. | LastWordNamingScheme |
| Answer» B. CamelCaseNamingScheme | |
| 13. |
___________ is a naming scheme in which the implicit name for a mock object is the last word of the mocked type’s name in lower case.$ |
| A. | AssertionErrorTranslator |
| B. | CamelCaseNamingScheme |
| C. | JavaReflectionImposteriser |
| D. | LastWordNamingScheme |
| Answer» E. | |
| 14. |
__________ is an Imposteriser that uses the Proxy class of the Java Reflection API. |
| A. | AssertionErrorTranslator |
| B. | CamelCaseNamingScheme |
| C. | JavaReflectionImposteriser |
| D. | IdentityExpectationErrorTranslator |
| Answer» D. IdentityExpectationErrorTranslator | |
| 15. |
__________ is an ExpectationErrorTranslator that doesn’t do any translation.$ |
| A. | AssertionErrorTranslator |
| B. | CamelCaseNamingScheme |
| C. | CurrentStateMatcher |
| D. | IdentityExpectationErrorTranslator |
| Answer» E. | |
| 16. |
_________ is a naming scheme wherein the implicit name for a mock object is the mocked type’s name with the first character represented in lower case.$ |
| A. | AssertionErrorTranslator |
| B. | CamelCaseNamingScheme |
| C. | CurrentStateMatcher |
| D. | IdentityExpectationErrorTranslator |
| Answer» C. CurrentStateMatcher | |
| 17. |
____________ translates ExpectationErrors into AssertionErrors that several test frameworks, including JUnit 4 and TestNG, use to report errors. |
| A. | AssertionErrorTranslator |
| B. | CamelCaseNamingScheme |
| C. | CurrentStateMatcher |
| D. | IdentityExpectationErrorTranslator |
| Answer» B. CamelCaseNamingScheme | |