Broadcom-VMware
2V0-72.22 · Question #73
Which statements is true?
The correct answer is C. Methods annotated with @BeforeAll will run only once before any tests in a class are executed. See the full explanation below for the reasoning.
Question
Which statements is true?
Options
- AMethods annotated with @AfterEach will run only once before any tests in a class are executed.
- B@BeforeAll annotation can only be used on non-static methods.
- CMethods annotated with @BeforeAll will run only once before any tests in a class are executed.
- D@AfterEach annotation must be used on a cleanup method when @BeforeEach is used.
How the community answered
(66 responses)- A6% (4)
- B14% (9)
- C77% (51)
- D3% (2)
Community Discussion
No community discussion yet for this question.