use of org.springframework.boot.info.BuildProperties in project spring-boot by spring-projects.
the class ProjectInfoAutoConfigurationTests method buildPropertiesFallbackWithBuildInfoBean.
@Test
public void buildPropertiesFallbackWithBuildInfoBean() {
load(CustomInfoPropertiesConfiguration.class);
BuildProperties buildProperties = this.context.getBean(BuildProperties.class);
assertThat(buildProperties).isSameAs(this.context.getBean("customBuildProperties"));
}
use of org.springframework.boot.info.BuildProperties in project spring-boot by spring-projects.
the class ProjectInfoAutoConfigurationTests method buildPropertiesCustomLocation.
@Test
public void buildPropertiesCustomLocation() {
load("spring.info.build.location=classpath:/org/springframework/boot/autoconfigure/info/build-info.properties");
BuildProperties buildProperties = this.context.getBean(BuildProperties.class);
assertThat(buildProperties.getGroup()).isEqualTo("com.example.acme");
assertThat(buildProperties.getArtifact()).isEqualTo("acme");
assertThat(buildProperties.getName()).isEqualTo("acme");
assertThat(buildProperties.getVersion()).isEqualTo("1.0.1-SNAPSHOT");
assertThat(buildProperties.getTime().getTime()).isEqualTo(1457088120000L);
}
use of org.springframework.boot.info.BuildProperties in project spring-boot by spring-projects.
the class ProjectInfoAutoConfigurationTests method buildPropertiesDefaultLocation.
@Test
public void buildPropertiesDefaultLocation() {
load();
BuildProperties buildProperties = this.context.getBean(BuildProperties.class);
assertThat(buildProperties.getGroup()).isEqualTo("com.example");
assertThat(buildProperties.getArtifact()).isEqualTo("demo");
assertThat(buildProperties.getName()).isEqualTo("Demo Project");
assertThat(buildProperties.getVersion()).isEqualTo("0.0.1-SNAPSHOT");
assertThat(buildProperties.getTime().getTime()).isEqualTo(1457100965000L);
}
Aggregations