Question 1
What is JUnit 5 also known as?
JUnit Jupiter
JUnit Lambda
JUnit NextGen
JUnit Assertions
Question 2
Which annotation in JUnit 5 is used to mark a method as a test case?
@TestCase
@JUnitTest
@Test
@UnitTest
Question 3
JUnit 5 is divided into three main modules. Which of the following is NOT one of them?
JUnit Platform
JUnit Jupiter
JUnit Vintage
JUnit Assertions
Question 4
In JUnit 5, which method is used to check if two values are equal?
assertSame()
assertTrue()
assertEquals()
assertFalse()
Question 5
Which assertion is used to check if a condition is true in JUnit 5?
assertEquals()
assertTrue()
assertSame()
assertNotEquals()
Question 6
What does the assertion assertThrows() verify in JUnit 5?
That two values are equal
That a block of code throws a specific exception
That no exception is thrown
That a condition is false
Question 7
Which annotation in JUnit 5 is used to run code before all test methods in a test class?
@BeforeAll
@BeforeEach
@Setup
@InitAll
Question 8
Which JUnit 5 assertion is used to check if two references point to the same object?
assertEquals()
assertSame()
assertNotSame()
assertTrue()
Question 9
In JUnit 5, what does the assertAll() method allow you to do?
Execute all test cases at once
Group multiple assertions so they are all executed, even if one fails
Check if all objects are equal
Verify all exceptions in a test
There are 9 questions to complete.