Rename @SpringApplicationTest -> @SpringBootTest

Rename @SpringApplicationTest to SpringBootTest and
@SpringApplicationContextLoader to @SpringBootContextLoader.

Fixes gh-5562
This commit is contained in:
Phillip Webb
2016-04-04 21:25:01 -07:00
parent b0b190b362
commit b398b3319c
168 changed files with 579 additions and 591 deletions

View File

@@ -25,7 +25,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringApplicationTest;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;
@@ -45,7 +45,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationTest
@SpringBootTest
// Enable JMX so we can test the MBeans (you can't do this in a properties file)
@TestPropertySource(properties = { "spring.jmx.enabled:true",
"spring.datasource.jmx-enabled:true" })

View File

@@ -20,7 +20,7 @@ import org.junit.runner.RunWith;
import sample.data.jpa.domain.City;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringApplicationTest;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.test.context.junit4.SpringRunner;
@@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Oliver Gierke
*/
@RunWith(SpringRunner.class)
@SpringApplicationTest
@SpringBootTest
public class CityRepositoryIntegrationTests {
@Autowired

View File

@@ -26,7 +26,7 @@ import sample.data.jpa.domain.Rating;
import sample.data.jpa.domain.RatingCount;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringApplicationTest;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort.Direction;
@@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Oliver Gierke
*/
@RunWith(SpringRunner.class)
@SpringApplicationTest
@SpringBootTest
public class HotelRepositoryIntegrationTests {
@Autowired