Test Fixture

The known objects and data prepared for a test.

What is Test Fixture in Java?

Test Fixture — The known objects and data prepared for a test.

import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;

class OrderCalculatorTest {
    @Test
    void totalsAnOrder() {
        int total = 3 * 4;
        assertEquals(12, total);
    }
}

Level: Freelancer · More Java terms at this level

Updated

In other subjects