add integration test profile

This commit is contained in:
DOHA 2016-10-22 17:21:26 +02:00
parent 5c7d521402
commit c9b956e9b9
14 changed files with 52 additions and 16 deletions

View File

@ -66,9 +66,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/*IntegrationTest.java</exclude>
<exclude>**/*LiveTest.java</exclude>
</excludes>
</configuration>
</plugin>
@ -85,6 +86,41 @@
</build>
<profiles>
<profile>
<id>integration</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<excludes>
<exclude>**/*LiveTest.java</exclude>
</excludes>
<includes>
<include>**/*IntegrationTest.java</include>
</includes>
</configuration>
</execution>
</executions>
<configuration>
<systemPropertyVariables>
<test.mime>json</test.mime>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<properties>
<maven-war-plugin.version>2.6</maven-war-plugin.version>
</properties>

View File

@ -16,7 +16,7 @@ import static org.junit.Assert.assertNotNull;
@ContextConfiguration(
loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestAutowiredType.class)
public class FieldAutowiredTest {
public class FieldAutowiredIntegrationTest {
@Autowired
private ArbitraryDependency fieldDependency;

View File

@ -16,7 +16,7 @@ import static org.junit.Assert.assertNotNull;
@ContextConfiguration(
loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestAutowiredName.class)
public class FieldAutowiredNameTest {
public class FieldAutowiredNameIntegrationTest {
@Autowired
private ArbitraryDependency autowiredFieldDependency;

View File

@ -17,7 +17,7 @@ import static org.junit.Assert.assertNotNull;
@ContextConfiguration(
loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestAutowiredQualifier.class)
public class FieldQualifierAutowiredTest {
public class FieldQualifierAutowiredIntegrationTest {
@Autowired
@Qualifier("autowiredFieldDependency")

View File

@ -18,7 +18,7 @@ import static org.junit.Assert.assertNotNull;
@ContextConfiguration(
loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestInjectName.class)
public class FieldByNameInjectTest {
public class FieldByNameInjectIntegrationTest {
@Inject
@Named("yetAnotherFieldInjectDependency")

View File

@ -17,7 +17,7 @@ import static org.junit.Assert.assertNotNull;
@ContextConfiguration(
loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestInjectType.class)
public class FieldInjectTest {
public class FieldInjectIntegrationTest {
@Inject
private ArbitraryDependency fieldInjectDependency;

View File

@ -17,7 +17,7 @@ import static org.junit.Assert.assertNotNull;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestInjectQualifier.class)
public class FieldQualifierInjectTest {
public class FieldQualifierInjectIntegrationTest {
@Inject
@Qualifier("defaultFile")

View File

@ -17,7 +17,7 @@ import static org.junit.Assert.assertNotNull;
@ContextConfiguration(
loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestResourceNameType.class)
public class FieldResourceInjectionTest {
public class FieldResourceInjectionIntegrationTest {
@Resource(name = "namedFile")
private File defaultFile;

View File

@ -18,7 +18,7 @@ import static org.junit.Assert.assertNotNull;
@ContextConfiguration(
loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestResourceQualifier.class)
public class MethodByQualifierResourceTest {
public class MethodByQualifierResourceIntegrationTest {
private File arbDependency;
private File anotherArbDependency;

View File

@ -17,7 +17,7 @@ import static org.junit.Assert.assertNotNull;
@ContextConfiguration(
loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestResourceNameType.class)
public class MethodByTypeResourceTest {
public class MethodByTypeResourceIntegrationTest {
private File defaultFile;

View File

@ -17,7 +17,7 @@ import static org.junit.Assert.assertNotNull;
@ContextConfiguration(
loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestResourceNameType.class)
public class MethodResourceInjectionTest {
public class MethodResourceInjectionIntegrationTest {
private File defaultFile;

View File

@ -16,7 +16,7 @@ import static org.junit.Assert.assertNotNull;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestResourceNameType.class)
public class NamedResourceTest {
public class NamedResourceIntegrationTest {
@Resource(name = "namedFile")
private File testFile;

View File

@ -18,7 +18,7 @@ import static org.junit.Assert.assertNotNull;
@ContextConfiguration(
loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestResourceQualifier.class)
public class QualifierResourceInjectionTest {
public class QualifierResourceInjectionIntegrationTest {
@Resource
@Qualifier("defaultFile")

View File

@ -16,7 +16,7 @@ import static org.junit.Assert.assertNotNull;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(loader = AnnotationConfigContextLoader.class,
classes = ApplicationContextTestResourceNameType.class)
public class SetterResourceInjectionTest {
public class SetterResourceInjectionIntegrationTest {
private File defaultFile;