Package org.springframework.boot.configurationprocessor.metadata

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


            MethodAndClassConfig.class));
  }

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

    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

    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

    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

    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

      this.defaultValue = defaultValue;
    }

    @Override
    public boolean matches(Object item) {
      ConfigurationMetadata metadata = (ConfigurationMetadata) item;
      ItemMetadata itemMetadata = getFirstPropertyWithName(metadata, this.name);
      if (itemMetadata == null) {
        return false;
      }
      if (this.type != null && !this.type.equals(itemMetadata.getType())) {
View Full Code Here

      return true;
    }

    @Override
    public void describeMismatch(Object item, Description description) {
      ConfigurationMetadata metadata = (ConfigurationMetadata) item;
      ItemMetadata property = getFirstPropertyWithName(metadata, this.name);
      if (property == null) {
        description.appendText("missing property " + this.name);
      }
      else {
View Full Code Here

TOP

Related Classes of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata

Copyright © 2018 www.massapicom. 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.