BAEL-4083 - add app integration test
This commit is contained in:
parent
eaf5935589
commit
c5f8489f1d
@ -18,6 +18,14 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -0,0 +1,26 @@
|
||||
package com.baeldung.springbootxml;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = SpringBootXmlApplication.class)
|
||||
public class SpringBootXmlApplicationIntegrationTest {
|
||||
|
||||
@Autowired private Pojo pojo;
|
||||
@Value("${sample}") private String sample;
|
||||
|
||||
@Test
|
||||
public void whenCallingGetter_thenPrintingProperty() {
|
||||
assertThat(pojo.getField())
|
||||
.isNotBlank()
|
||||
.isEqualTo(sample);
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user