Polish
This commit is contained in:
@@ -42,7 +42,6 @@ import org.springframework.boot.configurationsample.lombok.LombokInnerClassPrope
|
||||
import org.springframework.boot.configurationsample.lombok.LombokSimpleDataProperties;
|
||||
import org.springframework.boot.configurationsample.lombok.LombokSimpleProperties;
|
||||
import org.springframework.boot.configurationsample.lombok.SimpleLombokPojo;
|
||||
import org.springframework.boot.configurationsample.method.DeprecatedClassMethodConfig;
|
||||
import org.springframework.boot.configurationsample.method.DeprecatedMethodConfig;
|
||||
import org.springframework.boot.configurationsample.method.EmptyTypeMethodConfig;
|
||||
import org.springframework.boot.configurationsample.method.InvalidMethodConfig;
|
||||
@@ -290,8 +289,7 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
||||
public void deprecatedMethodConfig() throws Exception {
|
||||
Class<DeprecatedMethodConfig> type = DeprecatedMethodConfig.class;
|
||||
ConfigurationMetadata metadata = compile(type);
|
||||
assertThat(metadata)
|
||||
.has(Metadata.withGroup("foo").fromSource(type));
|
||||
assertThat(metadata).has(Metadata.withGroup("foo").fromSource(type));
|
||||
assertThat(metadata).has(Metadata.withProperty("foo.name", String.class)
|
||||
.fromSource(DeprecatedMethodConfig.Foo.class)
|
||||
.withDeprecation(null, null));
|
||||
@@ -301,16 +299,18 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
public void deprecatedMethodConfigOnClass() throws Exception {
|
||||
Class<DeprecatedClassMethodConfig> type = DeprecatedClassMethodConfig.class;
|
||||
Class<?> type = org.springframework.boot.configurationsample.method.DeprecatedClassMethodConfig.class;
|
||||
ConfigurationMetadata metadata = compile(type);
|
||||
assertThat(metadata)
|
||||
.has(Metadata.withGroup("foo").fromSource(type));
|
||||
assertThat(metadata).has(Metadata.withGroup("foo").fromSource(type));
|
||||
assertThat(metadata).has(Metadata.withProperty("foo.name", String.class)
|
||||
.fromSource(DeprecatedClassMethodConfig.Foo.class)
|
||||
.fromSource(
|
||||
org.springframework.boot.configurationsample.method.DeprecatedClassMethodConfig.Foo.class)
|
||||
.withDeprecation(null, null));
|
||||
assertThat(metadata).has(Metadata.withProperty("foo.flag", Boolean.class)
|
||||
.fromSource(DeprecatedClassMethodConfig.Foo.class)
|
||||
.fromSource(
|
||||
org.springframework.boot.configurationsample.method.DeprecatedClassMethodConfig.Foo.class)
|
||||
.withDeprecation(null, null));
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ public class DeprecatedClassMethodConfig {
|
||||
public void setFlag(boolean flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user