[BAEL-2998] - Fix jenkins tests

This commit is contained in:
at508
2019-10-21 22:04:26 -04:00
parent fb2406dba6
commit 15bf90a2be
5 changed files with 29 additions and 9 deletions

View File

@@ -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

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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() {