[BAEL-2998] - Fix jenkins tests
This commit is contained in:
@@ -10,10 +10,12 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.annotation.DirtiesContext.MethodMode;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
|
||||
@TestMethodOrder(OrderAnnotation.class)
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@SpringBootTest(classes = SpringDataRestApplication.class)
|
||||
@EnableWebMvc
|
||||
class DirtiesContextIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
package com.baeldung.overrideproperties;
|
||||
|
||||
import com.baeldung.overrideproperties.resolver.PropertySourceResolver;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.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.ActiveProfiles;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import com.baeldung.overrideproperties.resolver.PropertySourceResolver;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@ActiveProfiles("test")
|
||||
@EnableWebMvc
|
||||
public class ProfilePropertySourceResolverIntegrationTest {
|
||||
|
||||
@Autowired private PropertySourceResolver propertySourceResolver;
|
||||
@Autowired
|
||||
private PropertySourceResolver propertySourceResolver;
|
||||
|
||||
@Test
|
||||
public void shouldProfiledProperty_overridePropertyValues() {
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
package com.baeldung.overrideproperties;
|
||||
|
||||
import com.baeldung.overrideproperties.resolver.PropertySourceResolver;
|
||||
import org.junit.Assert;
|
||||
import org.junit.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;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
|
||||
import com.baeldung.overrideproperties.resolver.PropertySourceResolver;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(properties = { "example.firstProperty=annotation" })
|
||||
@EnableWebMvc
|
||||
public class SpringBootPropertySourceResolverIntegrationTest {
|
||||
|
||||
@Autowired private PropertySourceResolver propertySourceResolver;
|
||||
@Autowired
|
||||
private PropertySourceResolver propertySourceResolver;
|
||||
|
||||
@Test
|
||||
public void shouldSpringBootTestAnnotation_overridePropertyValues() {
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
package com.baeldung.overrideproperties;
|
||||
|
||||
import com.baeldung.overrideproperties.resolver.PropertySourceResolver;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.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;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import com.baeldung.overrideproperties.resolver.PropertySourceResolver;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@EnableWebMvc
|
||||
public class TestResourcePropertySourceResolverIntegrationTest {
|
||||
|
||||
@Autowired private PropertySourceResolver propertySourceResolver;
|
||||
@Autowired
|
||||
private PropertySourceResolver propertySourceResolver;
|
||||
|
||||
@Test
|
||||
public void shouldTestResourceFile_overridePropertyValues() {
|
||||
|
||||
Reference in New Issue
Block a user