

MCQOPTIONS
Saved Bookmarks
This section includes 13 Mcqs, each offering curated multiple-choice questions to sharpen your Junit knowledge and support exam preparation. Choose a topic below to get started.
1. |
___________ is used to test object identity. |
A. | instanceOf |
B. | isCompatibleType |
C. | type |
D. | sameInstance |
Answer» E. | |
2. |
The instanceOf matcher is equivalent to ________ |
A. | isCompatibleType |
B. | isCompatible |
C. | isInstance |
D. | isSame |
Answer» B. isCompatible | |
3. |
___________ traverses the meaning of the contained matchers. |
A. | not |
B. | or |
C. | allOf |
D. | andAll |
Answer» B. or | |
4. |
THE_INSTANCEOF_MATCHER_IS_EQUIVALENT_TO_________?$ |
A. | isCompatibleType |
B. | isCompatible |
C. | isInstance |
D. | isSame |
Answer» B. isCompatible | |
5. |
____________is_used_to_test_object_identity.$ |
A. | instanceOf |
B. | isCompatibleType |
C. | type |
D. | sameInstance |
Answer» E. | |
6. |
___________ traverses the meaning of the contained matchers? |
A. | not |
B. | or |
C. | allOf |
D. | andAll |
Answer» B. or | |
7. |
________ checks to see if any of the contained matchers match. |
A. | anyOf |
B. | allOf |
C. | instanceOf |
D. | notNull |
Answer» B. allOf | |
8. |
Which Hamcrest matcher is just like the && operator? |
A. | Is |
B. | Anything |
C. | sameInstance |
D. | allOf |
Answer» E. | |
9. |
______ is used only to improve the readability of the statements. |
A. | anything |
B. | is |
C. | sameInstance |
D. | nullValue |
Answer» C. sameInstance | |
10. |
______________ Hamcrest matcher can be used to match absolutely everything. |
A. | Is |
B. | AnyOf |
C. | Anything |
D. | Not |
Answer» D. Not | |
11. |
The package for the assertThat() function is? |
A. | org.hamcrest.CoreMatchers.assertThat |
B. | org.junit.Assert.assertThat |
C. | org.junit.JunitMatchers.assertThat |
D. | org.junit.hasItem.assertThat |
Answer» C. org.junit.JunitMatchers.assertThat | |
12. |
Hamcrest is not a ______________ framework in itself. |
A. | Matching |
B. | Testing |
C. | Asserting |
D. | Checking |
Answer» C. Asserting | |
13. |
________________ is a library that contains a lot of helpful matcher objects , ported in several languages. |
A. | Java |
B. | Pygame |
C. | AllenWake |
D. | Hamcrest |
Answer» E. | |