All quizzes
Free quiz · 39 questions in the bank

JUnit 5 quiz

Test your JUnit 5 knowledge with a free interactive quiz — 39 questions with answers and explanations. No signup needed to play.

Question 1/5Score 0

What does @EnumSource(CustomerTier.class) do in a parameterized test?

Questions in this quiz
  1. What does @EnumSource(CustomerTier.class) do in a parameterized test?
  2. What is the effect of using @ExtendWith(MockitoExtension.class) on a Jupiter test class?
  3. Which annotation replaces JUnit 4's @BeforeClass in JUnit Jupiter?
  4. Can a single Jupiter test class register more than one extension with @ExtendWith?
  5. What does @Nested do when applied to an inner class inside a Jupiter test class?
  6. In Jupiter, how is assertThrows typically written?
  7. What Maven dependency do you add to get JUnit Jupiter's core API (assuming no legacy JUnit 4 tests need to run)?
  8. What annotation replaces JUnit 4's @RunWith in JUnit Jupiter?
  9. What is a @TestFactory method used for?
  10. What does @MethodSource point to?
  11. What are the three components that together make up "JUnit 5"?
  12. What does @DisplayName do on a Jupiter test method?
Gaps to close?
Read the curated JUnit 5 notes — core concepts, patterns, interview prep.
JUnit 5 notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web