BAEL-3499 Moved code to spring-boot-properties (#8643)
This commit is contained in:
committed by
GitHub
parent
3b4c813b43
commit
6dcb329bbc
+24
@@ -0,0 +1,24 @@
|
||||
package com.baeldung.buildproperties;
|
||||
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import org.hamcrest.Matchers;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = Application.class)
|
||||
class BuildInfoServiceIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
private BuildInfoService service;
|
||||
|
||||
@Test
|
||||
void whenGetApplicationDescription_thenSuccess() {
|
||||
assertThat(service.getApplicationDescription(), Matchers.is("This is simple boot application for Spring boot actuator test"));
|
||||
assertThat(service.getApplicationVersion(), Matchers.is("0.0.1-SNAPSHOT"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user