Correct order

Report a typo

Given the following test class:

class CalculatorTests {

    @BeforeAll
    static void first() {
        // 1
    }

    @AfterAll
    static void second() {
        // 2
    }

    @BeforeEach
    void third() {
        // 3
    }

    @AfterEach
    void fourth() {
        // 4
    }

    @Test
    void fifth() {
        // 5
    }
}

Arrange its methods according to the order of their execution. The first method to execute should be on top and the last one should be at the bottom.

Put the items in the correct order
fifth() // 5
second() // 2
fourth() // 4
first() // 1
third() // 3
___

Create a free account to access the full topic