Java 类org.springframework.boot.configurationsample.simple.SimpleTypeProperties 实例源码

项目:contestparser    文件:ConfigurationMetadataAnnotationProcessorTests.java   
@Test
public void simpleTypeProperties() throws Exception {
    ConfigurationMetadata metadata = compile(SimpleTypeProperties.class);
    assertThat(metadata,
            containsGroup("simple.type").fromSource(SimpleTypeProperties.class));
    assertThat(metadata, containsProperty("simple.type.my-string", String.class));
    assertThat(metadata, containsProperty("simple.type.my-byte", Byte.class));
    assertThat(metadata,
            containsProperty("simple.type.my-primitive-byte", Byte.class));
    assertThat(metadata, containsProperty("simple.type.my-char", Character.class));
    assertThat(metadata,
            containsProperty("simple.type.my-primitive-char", Character.class));
    assertThat(metadata, containsProperty("simple.type.my-boolean", Boolean.class));
    assertThat(metadata,
            containsProperty("simple.type.my-primitive-boolean", Boolean.class));
    assertThat(metadata, containsProperty("simple.type.my-short", Short.class));
    assertThat(metadata,
            containsProperty("simple.type.my-primitive-short", Short.class));
    assertThat(metadata, containsProperty("simple.type.my-integer", Integer.class));
    assertThat(metadata,
            containsProperty("simple.type.my-primitive-integer", Integer.class));
    assertThat(metadata, containsProperty("simple.type.my-long", Long.class));
    assertThat(metadata,
            containsProperty("simple.type.my-primitive-long", Long.class));
    assertThat(metadata, containsProperty("simple.type.my-double", Double.class));
    assertThat(metadata,
            containsProperty("simple.type.my-primitive-double", Double.class));
    assertThat(metadata, containsProperty("simple.type.my-float", Float.class));
    assertThat(metadata,
            containsProperty("simple.type.my-primitive-float", Float.class));
    assertThat(metadata.getItems().size(), equalTo(18));
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ConfigurationMetadataAnnotationProcessorTests.java   
@Test
public void simpleTypeProperties() throws Exception {
    ConfigurationMetadata metadata = compile(SimpleTypeProperties.class);
    assertThat(metadata).has(
            Metadata.withGroup("simple.type").fromSource(SimpleTypeProperties.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-string", String.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-byte", Byte.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-primitive-byte", Byte.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-char", Character.class));
    assertThat(metadata).has(
            Metadata.withProperty("simple.type.my-primitive-char", Character.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-boolean", Boolean.class));
    assertThat(metadata).has(
            Metadata.withProperty("simple.type.my-primitive-boolean", Boolean.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-short", Short.class));
    assertThat(metadata).has(
            Metadata.withProperty("simple.type.my-primitive-short", Short.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-integer", Integer.class));
    assertThat(metadata).has(
            Metadata.withProperty("simple.type.my-primitive-integer", Integer.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-long", Long.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-primitive-long", Long.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-double", Double.class));
    assertThat(metadata).has(
            Metadata.withProperty("simple.type.my-primitive-double", Double.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-float", Float.class));
    assertThat(metadata).has(
            Metadata.withProperty("simple.type.my-primitive-float", Float.class));
    assertThat(metadata.getItems().size()).isEqualTo(18);
}
项目:spring-boot-concourse    文件:ConfigurationMetadataAnnotationProcessorTests.java   
@Test
public void simpleTypeProperties() throws Exception {
    ConfigurationMetadata metadata = compile(SimpleTypeProperties.class);
    assertThat(metadata).has(
            Metadata.withGroup("simple.type").fromSource(SimpleTypeProperties.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-string", String.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-byte", Byte.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-primitive-byte", Byte.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-char", Character.class));
    assertThat(metadata).has(
            Metadata.withProperty("simple.type.my-primitive-char", Character.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-boolean", Boolean.class));
    assertThat(metadata).has(
            Metadata.withProperty("simple.type.my-primitive-boolean", Boolean.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-short", Short.class));
    assertThat(metadata).has(
            Metadata.withProperty("simple.type.my-primitive-short", Short.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-integer", Integer.class));
    assertThat(metadata).has(
            Metadata.withProperty("simple.type.my-primitive-integer", Integer.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-long", Long.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-primitive-long", Long.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-double", Double.class));
    assertThat(metadata).has(
            Metadata.withProperty("simple.type.my-primitive-double", Double.class));
    assertThat(metadata)
            .has(Metadata.withProperty("simple.type.my-float", Float.class));
    assertThat(metadata).has(
            Metadata.withProperty("simple.type.my-primitive-float", Float.class));
    assertThat(metadata.getItems().size()).isEqualTo(18);
}