Skip to content

Commit bc6bcc3

Browse files
authored
Mark integration tests (eugenp#1690)
1 parent 5e1e320 commit bc6bcc3

4 files changed

Lines changed: 17 additions & 20 deletions

File tree

spring-boot/src/test/java/org/baeldung/boot/boottest/EmployeeRestControllerTest.java renamed to spring-boot/src/test/java/org/baeldung/boot/boottest/EmployeeControllerIntegrationTest.java

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
package org.baeldung.boot.boottest;
22

3-
import static org.hamcrest.CoreMatchers.is;
4-
import static org.hamcrest.Matchers.hasSize;
5-
import static org.mockito.BDDMockito.given;
6-
import static org.mockito.Mockito.reset;
7-
import static org.mockito.Mockito.verify;
8-
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
9-
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
10-
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
11-
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
12-
13-
import java.util.Arrays;
14-
import java.util.List;
15-
16-
import org.baeldung.boot.boottest.Employee;
17-
import org.baeldung.boot.boottest.EmployeeRestController;
18-
import org.baeldung.boot.boottest.EmployeeService;
193
import org.junit.Before;
204
import org.junit.Test;
215
import org.junit.runner.RunWith;
@@ -28,9 +12,22 @@
2812
import org.springframework.test.context.junit4.SpringRunner;
2913
import org.springframework.test.web.servlet.MockMvc;
3014

15+
import java.util.Arrays;
16+
import java.util.List;
17+
18+
import static org.hamcrest.CoreMatchers.is;
19+
import static org.hamcrest.Matchers.hasSize;
20+
import static org.mockito.BDDMockito.given;
21+
import static org.mockito.Mockito.reset;
22+
import static org.mockito.Mockito.verify;
23+
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
24+
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
25+
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
26+
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
27+
3128
@RunWith(SpringRunner.class)
3229
@WebMvcTest(EmployeeRestController.class)
33-
public class EmployeeRestControllerTest {
30+
public class EmployeeControllerIntegrationTest {
3431

3532
@Autowired
3633
private MockMvc mvc;

spring-boot/src/test/java/org/baeldung/boot/boottest/EmployeeRepositoryTest.java renamed to spring-boot/src/test/java/org/baeldung/boot/boottest/EmployeeRepositoryIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
@RunWith(SpringRunner.class)
1919
@DataJpaTest
20-
public class EmployeeRepositoryTest {
20+
public class EmployeeRepositoryIntegrationTest {
2121

2222
@Autowired
2323
private TestEntityManager entityManager;

spring-boot/src/test/java/org/baeldung/boot/boottest/EmployeeRestControllerIntTest.java renamed to spring-boot/src/test/java/org/baeldung/boot/boottest/EmployeeRestControllerIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, classes = DemoApplication.class)
3232
@AutoConfigureMockMvc
3333
@TestPropertySource(locations = "classpath:application-integrationtest.properties")
34-
public class EmployeeRestControllerIntTest {
34+
public class EmployeeRestControllerIntegrationTest {
3535

3636
@Autowired
3737
private MockMvc mvc;

spring-boot/src/test/java/org/baeldung/boot/boottest/EmployeeServiceImplTest.java renamed to spring-boot/src/test/java/org/baeldung/boot/boottest/EmployeeServiceImplIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.springframework.test.context.junit4.SpringRunner;
2424

2525
@RunWith(SpringRunner.class)
26-
public class EmployeeServiceImplTest {
26+
public class EmployeeServiceImplIntegrationTest {
2727

2828
@TestConfiguration
2929
static class EmployeeServiceImplTestContextConfiguration {

0 commit comments

Comments
 (0)