Examples of ConfigurationMetaData


Examples of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata

    assertThat(metadata.getItems().size(), equalTo(18));
  }

  @Test
  public void hierarchicalProperties() throws Exception {
    ConfigurationMetadata metadata = compile(HierarchicalProperties.class);
    assertThat(metadata,
        containsGroup("hierarchical").fromSource(HierarchicalProperties.class));
    assertThat(metadata, containsProperty("hierarchical.first", String.class)
        .fromSource(HierarchicalProperties.class));
    assertThat(metadata, containsProperty("hierarchical.second", String.class)
View Full Code Here

Examples of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata

        .fromSource(HierarchicalProperties.class));
  }

  @Test
  public void parseCollectionConfig() throws Exception {
    ConfigurationMetadata metadata = compile(SimpleCollectionProperties.class);
    // getter and setter
    assertThat(
        metadata,
        containsProperty("collection.integers-to-names",
            "java.util.Map<java.lang.Integer,java.lang.String>"));
View Full Code Here

Examples of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata

        containsProperty("collection.doubles", "java.util.List<java.lang.Double>"));
  }

  @Test
  public void simpleMethodConfig() throws Exception {
    ConfigurationMetadata metadata = compile(SimpleMethodConfig.class);
    assertThat(metadata, containsGroup("foo").fromSource(SimpleMethodConfig.class));
    assertThat(
        metadata,
        containsProperty("foo.name", String.class).fromSource(
            SimpleMethodConfig.Foo.class));
View Full Code Here

Examples of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata

            SimpleMethodConfig.Foo.class));
  }

  @Test
  public void invalidMethodConfig() throws Exception {
    ConfigurationMetadata metadata = compile(InvalidMethodConfig.class);
    assertThat(
        metadata,
        containsProperty("something.name", String.class).fromSource(
            InvalidMethodConfig.class));
    assertThat(metadata, not(containsProperty("invalid.name")));
View Full Code Here

Examples of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata

    assertThat(metadata, not(containsProperty("invalid.name")));
  }

  @Test
  public void methodAndClassConfig() throws Exception {
    ConfigurationMetadata metadata = compile(MethodAndClassConfig.class);
    assertThat(
        metadata,
        containsProperty("conflict.name", String.class).fromSource(
            MethodAndClassConfig.Foo.class));
    assertThat(
View Full Code Here

Examples of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata

            MethodAndClassConfig.class));
  }

  @Test
  public void emptyTypeMethodConfig() throws Exception {
    ConfigurationMetadata metadata = compile(EmptyTypeMethodConfig.class);
    assertThat(metadata, not(containsProperty("something.foo")));
  }
View Full Code Here

Examples of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata

    assertThat(metadata, not(containsProperty("something.foo")));
  }

  @Test
  public void innerClassRootConfig() throws Exception {
    ConfigurationMetadata metadata = compile(InnerClassRootConfig.class);
    assertThat(metadata, containsProperty("config.name"));
  }
View Full Code Here

Examples of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata

    assertThat(metadata, containsProperty("config.name"));
  }

  @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));
View Full Code Here

Examples of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata

    assertThat(metadata, containsProperty("config.third.value"));
  }

  @Test
  public void innerClassAnnotatedGetterConfig() throws Exception {
    ConfigurationMetadata metadata = compile(InnerClassAnnotatedGetterConfig.class);
    assertThat(metadata, containsProperty("specific.value"));
    assertThat(metadata, containsProperty("foo.name"));
    assertThat(metadata, not(containsProperty("specific.foo")));
  }
View Full Code Here

Examples of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata

    assertThat(metadata, not(containsProperty("specific.foo")));
  }

  @Test
  public void builderPojo() throws IOException {
    ConfigurationMetadata metadata = compile(BuilderPojo.class);
    assertThat(metadata, containsProperty("builder.name"));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.