Commit bacf0878 authored by Phillip Webb's avatar Phillip Webb

Polish

parent 948b5760
......@@ -48,17 +48,16 @@ public class ManagementServerPropertiesAutoConfigurationNoSecurityTests {
@Test
public void securitySettingsIgnoredWithoutSpringSecurity() {
ManagementServerProperties properties =
load("management.security.enabled=false");
ManagementServerProperties properties = load("management.security.enabled=false");
assertThat(properties.getSecurity().isEnabled()).isFalse();
}
public ManagementServerProperties load(String... environment) {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(ctx, environment);
ctx.register(ManagementServerPropertiesAutoConfiguration.class);
ctx.refresh();
this.context = ctx;
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(context, environment);
context.register(ManagementServerPropertiesAutoConfiguration.class);
context.refresh();
this.context = context;
return this.context.getBean(ManagementServerProperties.class);
}
......
......@@ -51,6 +51,7 @@ import org.springframework.web.servlet.DispatcherServlet;
public class MockMvcAutoConfiguration {
private final WebApplicationContext context;
private final WebMvcProperties webMvcProperties;
MockMvcAutoConfiguration(WebApplicationContext context,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment