Commit f0d94a46 authored by Stephane Nicoll's avatar Stephane Nicoll

Polish

parent afba8fed
......@@ -16,13 +16,8 @@
package org.springframework.boot.actuate.autoconfigure.web.server;
import org.junit.After;
import org.junit.Test;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import static org.assertj.core.api.Assertions.assertThat;
/**
......@@ -33,15 +28,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
public class ManagementServerPropertiesTests {
private AnnotationConfigApplicationContext context;
@After
public void close() {
if (this.context != null) {
this.context.close();
}
}
@Test
public void defaultManagementServerProperties() {
ManagementServerProperties properties = new ManagementServerProperties();
......@@ -73,18 +59,4 @@ public class ManagementServerPropertiesTests {
assertThat(properties.getServlet().getContextPath()).isEqualTo("");
}
public ManagementServerProperties load(String... environment) {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
TestPropertyValues.of(environment).applyTo(ctx);
ctx.register(Config.class);
ctx.refresh();
this.context = ctx;
return this.context.getBean(ManagementServerProperties.class);
}
@EnableConfigurationProperties(ManagementServerProperties.class)
protected static class Config {
}
}
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