JAVA-8764: Fix test/main directories structure

This commit is contained in:
Krzysiek
2021-12-02 12:27:52 +01:00
parent 8ce908b85e
commit 205ad52ea2
@@ -0,0 +1,27 @@
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);
}
}