Tagged: junit

SpringBoot + Junit 예제

SpringBoot + Junit 예제 import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class BootrestApplicationTests { @Autowired private TestRestTemplate restTemplate; @Test public void testSpringBootApp() throws JsonProcessingException, IOException{ String body = restTemplate.getForObject(“/”,...