Java 类org.springframework.boot.configurationsample.specific.SimplePojo 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ConfigurationMetadataAnnotationProcessorTests.java   
@Test
public void innerClassProperties() throws Exception {
    ConfigurationMetadata metadata = compile(InnerClassProperties.class);
    assertThat(metadata)
            .has(Metadata.withGroup("config").fromSource(InnerClassProperties.class));
    assertThat(metadata).has(
            Metadata.withGroup("config.first").ofType(InnerClassProperties.Foo.class)
                    .fromSource(InnerClassProperties.class));
    assertThat(metadata).has(Metadata.withProperty("config.first.name"));
    assertThat(metadata).has(Metadata.withProperty("config.first.bar.name"));
    assertThat(metadata).has(
            Metadata.withGroup("config.the-second", InnerClassProperties.Foo.class)
                    .fromSource(InnerClassProperties.class));
    assertThat(metadata).has(Metadata.withProperty("config.the-second.name"));
    assertThat(metadata).has(Metadata.withProperty("config.the-second.bar.name"));
    assertThat(metadata).has(Metadata.withGroup("config.third")
            .ofType(SimplePojo.class).fromSource(InnerClassProperties.class));
    assertThat(metadata).has(Metadata.withProperty("config.third.value"));
    assertThat(metadata).has(Metadata.withProperty("config.fourth"));
    assertThat(metadata).isNotEqualTo(Metadata.withGroup("config.fourth"));
}
项目:spring-boot-concourse    文件:ConfigurationMetadataAnnotationProcessorTests.java   
@Test
public void innerClassProperties() throws Exception {
    ConfigurationMetadata metadata = compile(InnerClassProperties.class);
    assertThat(metadata)
            .has(Metadata.withGroup("config").fromSource(InnerClassProperties.class));
    assertThat(metadata).has(
            Metadata.withGroup("config.first").ofType(InnerClassProperties.Foo.class)
                    .fromSource(InnerClassProperties.class));
    assertThat(metadata).has(Metadata.withProperty("config.first.name"));
    assertThat(metadata).has(Metadata.withProperty("config.first.bar.name"));
    assertThat(metadata).has(
            Metadata.withGroup("config.the-second", InnerClassProperties.Foo.class)
                    .fromSource(InnerClassProperties.class));
    assertThat(metadata).has(Metadata.withProperty("config.the-second.name"));
    assertThat(metadata).has(Metadata.withProperty("config.the-second.bar.name"));
    assertThat(metadata).has(Metadata.withGroup("config.third")
            .ofType(SimplePojo.class).fromSource(InnerClassProperties.class));
    assertThat(metadata).has(Metadata.withProperty("config.third.value"));
    assertThat(metadata).has(Metadata.withProperty("config.fourth"));
    assertThat(metadata).isNotEqualTo(Metadata.withGroup("config.fourth"));
}
项目:contestparser    文件:ConfigurationMetadataAnnotationProcessorTests.java   
@Test
public void innerClassProperties() throws Exception {
    ConfigurationMetadata metadata = compile(InnerClassProperties.class);
    assertThat(metadata,
            containsGroup("config").fromSource(InnerClassProperties.class));
    assertThat(metadata,
            containsGroup("config.first").ofType(InnerClassProperties.Foo.class)
                    .fromSource(InnerClassProperties.class));
    assertThat(metadata, containsProperty("config.first.name"));
    assertThat(metadata, containsProperty("config.first.bar.name"));
    assertThat(metadata,
            containsGroup("config.the-second", InnerClassProperties.Foo.class)
                    .fromSource(InnerClassProperties.class));
    assertThat(metadata, containsProperty("config.the-second.name"));
    assertThat(metadata, containsProperty("config.the-second.bar.name"));
    assertThat(metadata, containsGroup("config.third").ofType(SimplePojo.class)
            .fromSource(InnerClassProperties.class));
    assertThat(metadata, containsProperty("config.third.value"));
    assertThat(metadata, containsProperty("config.fourth"));
    assertThat(metadata, not(containsGroup("config.fourth")));
}