This commit is contained in:
Phillip Webb
2014-05-26 21:48:19 +01:00
parent 96adb87bbd
commit 6381fdcb49
12 changed files with 77 additions and 29 deletions

View File

@@ -30,7 +30,6 @@ import org.springframework.beans.factory.BeanCreationException;
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
import org.springframework.boot.test.EnvironmentTestUtils;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
@@ -40,7 +39,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
/**
* Tests for {@link LiquibaseAutoConfiguration}.
* Tests for {@link FlywayAutoConfiguration}.
*
* @author Dave Syer
*/

View File

@@ -16,9 +16,6 @@
package org.springframework.boot.autoconfigure.mobile;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import java.lang.reflect.Field;
import java.util.List;
@@ -39,6 +36,9 @@ import org.springframework.util.ReflectionUtils;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
/**
* Tests for {@link DeviceResolverAutoConfiguration}.
*
@@ -82,7 +82,8 @@ public class DeviceResolverAutoConfigurationTests {
DeviceResolverAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class);
context.refresh();
RequestMappingHandlerMapping mapping = (RequestMappingHandlerMapping) context.getBean("requestMappingHandlerMapping");
RequestMappingHandlerMapping mapping = (RequestMappingHandlerMapping) context
.getBean("requestMappingHandlerMapping");
Field interceptorsField = ReflectionUtils.findField(
RequestMappingHandlerMapping.class, "interceptors");
interceptorsField.setAccessible(true);