/
NikolayIvkin
/
tutorials1
Обзор
Документация
Войти
/
NikolayIvkin
/
tutorials1
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
spring-boot-modules/spring-boot-basic-customization-2/src/test/java/com/baeldung/springbootxml/SpringBootXmlApplicationIntegrationTest.java
27 строк
802 B
Krzysiek
JAVA-8764: Fix test/main directories structure
02 дек 2021, 14:27
02 дек 2021, 14:27
205ad52
Код
Авторство
О чём код?
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); } }