quick fix

This commit is contained in:
azhwani 2020-07-09 13:16:27 +01:00
parent aeb1653c89
commit d0271aaf8e
2 changed files with 18 additions and 12 deletions

View File

@ -3,16 +3,19 @@ package com.baeldung.properties.yamllist;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.boot.test.context.ConfigFileApplicationContextInitializer;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import com.baeldung.properties.yamllist.pojo.ApplicationProps; import com.baeldung.properties.yamllist.pojo.ApplicationProps;
@RunWith(SpringRunner.class) @ExtendWith(SpringExtension.class)
@SpringBootTest @ContextConfiguration(initializers = ConfigFileApplicationContextInitializer.class)
class YamlComplexListsIntegrationTest { @EnableConfigurationProperties(value = ApplicationProps.class)
class YamlComplexListsUnitTest {
@Autowired @Autowired
private ApplicationProps applicationProps; private ApplicationProps applicationProps;

View File

@ -3,16 +3,19 @@ package com.baeldung.properties.yamllist;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.boot.test.context.ConfigFileApplicationContextInitializer;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import com.baeldung.properties.yamllist.pojo.ApplicationProps; import com.baeldung.properties.yamllist.pojo.ApplicationProps;
@RunWith(SpringRunner.class) @ExtendWith(SpringExtension.class)
@SpringBootTest @ContextConfiguration(initializers = ConfigFileApplicationContextInitializer.class)
class YamlSimpleListIntegrationTest { @EnableConfigurationProperties(value = ApplicationProps.class)
class YamlSimpleListUnitTest {
@Autowired @Autowired
private ApplicationProps applicationProps; private ApplicationProps applicationProps;