BAEL-3499 Added files for article (#8498)
This commit is contained in:
committed by
Grzegorz Piwowarek
parent
7a186e9bc8
commit
56f11da504
+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