upgrade and cleanup
This commit is contained in:
parent
628011bbfa
commit
de7c1b362f
|
@ -11,7 +11,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>1.3.3.RELEASE</version>
|
<version>1.4.2.RELEASE</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-lang3</artifactId>
|
<artifactId>commons-lang3</artifactId>
|
||||||
<version>3.3</version>
|
<version>${commons-lang3.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
|
@ -60,15 +60,20 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.rest-assured</groupId>
|
<groupId>io.rest-assured</groupId>
|
||||||
<artifactId>rest-assured</artifactId>
|
<artifactId>rest-assured</artifactId>
|
||||||
<version>3.0.0</version>
|
<version>${rest-assured.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.rest-assured</groupId>
|
<groupId>io.rest-assured</groupId>
|
||||||
<artifactId>spring-mock-mvc</artifactId>
|
<artifactId>spring-mock-mvc</artifactId>
|
||||||
<version>3.0.0</version>
|
<version>${rest-assured.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -142,6 +147,8 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<guava.version>19.0</guava.version>
|
<guava.version>19.0</guava.version>
|
||||||
|
<commons-lang3.version>3.5</commons-lang3.version>
|
||||||
|
<rest-assured.version>3.0.1</rest-assured.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,26 +1,23 @@
|
||||||
package org.baeldung.web.service;
|
package org.baeldung.web.service;
|
||||||
|
|
||||||
|
import static io.restassured.RestAssured.given;
|
||||||
|
import static org.hamcrest.core.Is.is;
|
||||||
|
import static org.hamcrest.core.IsCollectionContaining.hasItems;
|
||||||
|
import static org.hamcrest.core.IsEqual.equalTo;
|
||||||
|
|
||||||
import org.apache.commons.lang3.RandomStringUtils;
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
import org.baeldung.web.main.Application;
|
import org.baeldung.web.main.Application;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.boot.test.IntegrationTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
import org.springframework.test.context.web.WebAppConfiguration;
|
|
||||||
|
|
||||||
import static io.restassured.RestAssured.*;
|
@RunWith(SpringRunner.class)
|
||||||
import static org.hamcrest.core.IsCollectionContaining.*;
|
@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.DEFINED_PORT)
|
||||||
import static org.hamcrest.core.Is.*;
|
|
||||||
import static org.hamcrest.core.IsEqual.*;
|
|
||||||
|
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
|
||||||
@SpringApplicationConfiguration(classes = Application.class)
|
|
||||||
@WebAppConfiguration
|
|
||||||
@IntegrationTest("server.port:8888")
|
|
||||||
public class StudentServiceIntegrationTest {
|
public class StudentServiceIntegrationTest {
|
||||||
|
|
||||||
private static final String ENDPOINT = "http://localhost:8888/student/get";
|
private static final String ENDPOINT = "http://localhost:8080/student/get";
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenRequestForStudents_whenPageIsOne_expectContainsNames() {
|
public void givenRequestForStudents_whenPageIsOne_expectContainsNames() {
|
||||||
|
|
Loading…
Reference in New Issue