本文整理匯總了Java中org.springframework.boot.configurationsample.incremental.FooProperties類的典型用法代碼示例。如果您正苦於以下問題:Java FooProperties類的具體用法?Java FooProperties怎麽用?Java FooProperties使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
FooProperties類屬於org.springframework.boot.configurationsample.incremental包,在下文中一共展示了FooProperties類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: incrementalBuildTypeRenamed
import org.springframework.boot.configurationsample.incremental.FooProperties; //導入依賴的package包/類
@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));
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:22,代碼來源:ConfigurationMetadataAnnotationProcessorTests.java
示例2: incrementalBuildTypeRenamed
import org.springframework.boot.configurationsample.incremental.FooProperties; //導入依賴的package包/類
@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));
}
示例3: incrementalBuild
import org.springframework.boot.configurationsample.incremental.FooProperties; //導入依賴的package包/類
@Test
public void incrementalBuild() throws Exception {
TestProject project = new TestProject(this.temporaryFolder, FooProperties.class,
BarProperties.class);
assertThat(project.getOutputFile(MetadataStore.METADATA_PATH).exists()).isFalse();
ConfigurationMetadata metadata = project.fullBuild();
assertThat(project.getOutputFile(MetadataStore.METADATA_PATH).exists()).isTrue();
assertThat(metadata).has(
Metadata.withProperty("foo.counter").fromSource(FooProperties.class));
assertThat(metadata).has(
Metadata.withProperty("bar.counter").fromSource(BarProperties.class));
metadata = project.incrementalBuild(BarProperties.class);
assertThat(metadata).has(
Metadata.withProperty("foo.counter").fromSource(FooProperties.class));
assertThat(metadata).has(
Metadata.withProperty("bar.counter").fromSource(BarProperties.class));
project.addSourceCode(BarProperties.class,
BarProperties.class.getResourceAsStream("BarProperties.snippet"));
metadata = project.incrementalBuild(BarProperties.class);
assertThat(metadata).has(Metadata.withProperty("bar.extra"));
assertThat(metadata).has(Metadata.withProperty("foo.counter"));
assertThat(metadata).has(Metadata.withProperty("bar.counter"));
project.revert(BarProperties.class);
metadata = project.incrementalBuild(BarProperties.class);
assertThat(metadata).isNotEqualTo(Metadata.withProperty("bar.extra"));
assertThat(metadata).has(Metadata.withProperty("foo.counter"));
assertThat(metadata).has(Metadata.withProperty("bar.counter"));
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:29,代碼來源:ConfigurationMetadataAnnotationProcessorTests.java
示例4: incrementalBuildAnnotationRemoved
import org.springframework.boot.configurationsample.incremental.FooProperties; //導入依賴的package包/類
@Test
public void incrementalBuildAnnotationRemoved() throws Exception {
TestProject project = new TestProject(this.temporaryFolder, FooProperties.class,
BarProperties.class);
ConfigurationMetadata metadata = project.fullBuild();
assertThat(metadata).has(Metadata.withProperty("foo.counter"));
assertThat(metadata).has(Metadata.withProperty("bar.counter"));
project.replaceText(BarProperties.class, "@ConfigurationProperties",
"//@ConfigurationProperties");
metadata = project.incrementalBuild(BarProperties.class);
assertThat(metadata).has(Metadata.withProperty("foo.counter"));
assertThat(metadata).isNotEqualTo(Metadata.withProperty("bar.counter"));
}
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:14,代碼來源:ConfigurationMetadataAnnotationProcessorTests.java
示例5: incrementalBuild
import org.springframework.boot.configurationsample.incremental.FooProperties; //導入依賴的package包/類
@Test
public void incrementalBuild() throws Exception {
TestProject project = new TestProject(this.temporaryFolder, FooProperties.class,
BarProperties.class);
assertFalse(project.getOutputFile(MetadataStore.METADATA_PATH).exists());
ConfigurationMetadata metadata = project.fullBuild();
assertTrue(project.getOutputFile(MetadataStore.METADATA_PATH).exists());
assertThat(metadata,
containsProperty("foo.counter").fromSource(FooProperties.class));
assertThat(metadata,
containsProperty("bar.counter").fromSource(BarProperties.class));
metadata = project.incrementalBuild(BarProperties.class);
assertThat(metadata,
containsProperty("foo.counter").fromSource(FooProperties.class));
assertThat(metadata,
containsProperty("bar.counter").fromSource(BarProperties.class));
project.addSourceCode(BarProperties.class,
BarProperties.class.getResourceAsStream("BarProperties.snippet"));
metadata = project.incrementalBuild(BarProperties.class);
assertThat(metadata, containsProperty("bar.extra"));
assertThat(metadata, containsProperty("foo.counter"));
assertThat(metadata, containsProperty("bar.counter"));
project.revert(BarProperties.class);
metadata = project.incrementalBuild(BarProperties.class);
assertThat(metadata, not(containsProperty("bar.extra")));
assertThat(metadata, containsProperty("foo.counter"));
assertThat(metadata, containsProperty("bar.counter"));
}
示例6: incrementalBuildAnnotationRemoved
import org.springframework.boot.configurationsample.incremental.FooProperties; //導入依賴的package包/類
@Test
public void incrementalBuildAnnotationRemoved() throws Exception {
TestProject project = new TestProject(this.temporaryFolder, FooProperties.class,
BarProperties.class);
ConfigurationMetadata metadata = project.fullBuild();
assertThat(metadata, containsProperty("foo.counter"));
assertThat(metadata, containsProperty("bar.counter"));
project.replaceText(BarProperties.class, "@ConfigurationProperties",
"//@ConfigurationProperties");
metadata = project.incrementalBuild(BarProperties.class);
assertThat(metadata, containsProperty("foo.counter"));
assertThat(metadata, not(containsProperty("bar.counter")));
}