Java 类org.springframework.boot.configurationsample.incremental.RenamedBarProperties 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ConfigurationMetadataAnnotationProcessorTests.java   
@Test
public void incrementalBuildTypeRenamed() throws Exception {
    TestProject project = new TestProject(this.temporaryFolder, FooProperties.class,
            BarProperties.class);
    ConfigurationMetadata metadata = project.fullBuild();
    assertThat(metadata).has(
            Metadata.withProperty("foo.counter").fromSource(FooProperties.class));
    assertThat(metadata).has(
            Metadata.withProperty("bar.counter").fromSource(BarProperties.class));
    assertThat(metadata).doesNotHave(Metadata.withProperty("bar.counter")
            .fromSource(RenamedBarProperties.class));
    project.delete(BarProperties.class);
    project.add(RenamedBarProperties.class);
    metadata = project.incrementalBuild(RenamedBarProperties.class);
    assertThat(metadata).has(
            Metadata.withProperty("foo.counter").fromSource(FooProperties.class));
    assertThat(metadata).doesNotHave(
            Metadata.withProperty("bar.counter").fromSource(BarProperties.class));
    assertThat(metadata).has(Metadata.withProperty("bar.counter")
            .fromSource(RenamedBarProperties.class));
}
项目:spring-boot-concourse    文件:ConfigurationMetadataAnnotationProcessorTests.java   
@Test
public void incrementalBuildTypeRenamed() throws Exception {
    TestProject project = new TestProject(this.temporaryFolder, FooProperties.class,
            BarProperties.class);
    ConfigurationMetadata metadata = project.fullBuild();
    assertThat(metadata).has(
            Metadata.withProperty("foo.counter").fromSource(FooProperties.class));
    assertThat(metadata).has(
            Metadata.withProperty("bar.counter").fromSource(BarProperties.class));
    assertThat(metadata).doesNotHave(Metadata.withProperty("bar.counter")
            .fromSource(RenamedBarProperties.class));
    project.delete(BarProperties.class);
    project.add(RenamedBarProperties.class);
    metadata = project.incrementalBuild(RenamedBarProperties.class);
    assertThat(metadata).has(
            Metadata.withProperty("foo.counter").fromSource(FooProperties.class));
    assertThat(metadata).doesNotHave(
            Metadata.withProperty("bar.counter").fromSource(BarProperties.class));
    assertThat(metadata).has(Metadata.withProperty("bar.counter")
            .fromSource(RenamedBarProperties.class));
}
项目:contestparser    文件:ConfigurationMetadataAnnotationProcessorTests.java   
@Test
public void incrementalBuildTypeRenamed() throws Exception {
    TestProject project = new TestProject(this.temporaryFolder, FooProperties.class,
            BarProperties.class);
    ConfigurationMetadata metadata = project.fullBuild();
    assertThat(metadata,
            containsProperty("foo.counter").fromSource(FooProperties.class));
    assertThat(metadata,
            containsProperty("bar.counter").fromSource(BarProperties.class));
    assertThat(metadata, not(
            containsProperty("bar.counter").fromSource(RenamedBarProperties.class)));

    project.delete(BarProperties.class);
    project.add(RenamedBarProperties.class);
    metadata = project.incrementalBuild(RenamedBarProperties.class);
    assertThat(metadata,
            containsProperty("foo.counter").fromSource(FooProperties.class));
    assertThat(metadata,
            not(containsProperty("bar.counter").fromSource(BarProperties.class)));
    assertThat(metadata,
            containsProperty("bar.counter").fromSource(RenamedBarProperties.class));
}