This commit is contained in:
Stephane Nicoll 2017-12-28 12:09:27 +01:00
parent afba8fed79
commit f0d94a46fd
1 changed files with 0 additions and 28 deletions

View File

@ -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 {
}
}