DEV Community

Er. Bhupendra
Er. Bhupendra

Posted on

JUNIT-TESTING-JAVA-UNIT_TESTING

EXAMPLE
1.Bussiness logic file

  1. Inside Test ==> testing file

  1. run the file

  1. see green color as successfully

5 ==> test file inside any method failed then it show entire class failed

multiple methods are there
in one method we can use multiple test cases

=======================

@BeforeAll @BeforeEach @test how this work and in which order

@BeforeAll
static void setupOnce() {} // runs 1 time

@BeforeEach
void setup() {} // runs before each test

@test
void test1() {}

@test
void test2() {}

Top comments (0)