vidstige/jadb#26 separate tests for unit and integration

This commit is contained in:
Arthur 2016-07-29 19:51:52 +03:00
parent ee20300b30
commit c94d080159
6 changed files with 34 additions and 7 deletions

31
pom.xml
View File

@ -27,6 +27,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.source>1.7</maven.compiler.source>
</properties> </properties>
@ -82,19 +83,45 @@
</dependencies> </dependencies>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version> <version>2.19.1</version>
<configuration> <configuration>
<includes> <includes>
<include>**/*.java</include> <include>**/*.java</include>
</includes> </includes>
<excludes> <excludes>
<!--Integration tests -->
<exclude>se.vidstige.jadb.test.integration.*</exclude>
<!--Mocks and data-->
<exclude>**/data/*</exclude> <exclude>**/data/*</exclude>
<exclude>**/fakes/*</exclude> <exclude>**/fakes/*</exclude>
</excludes> </excludes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<includes>
<include>**/*.java</include>
</includes>
<excludes>
<!--Integration tests -->
<exclude>se.vidstige.jadb.test.unit.*</exclude>
<!--Mocks and data-->
<exclude>**/data/*</exclude>
<exclude>**/fakes/*</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>

View File

@ -1,4 +1,4 @@
package se.vidstige.jadb.test; package se.vidstige.jadb.test.integration;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;

View File

@ -1,4 +1,4 @@
package se.vidstige.jadb.test; package se.vidstige.jadb.test.integration;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;

View File

@ -1,4 +1,4 @@
package se.vidstige.jadb.test; package se.vidstige.jadb.test.unit;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;

View File

@ -1,4 +1,4 @@
package se.vidstige.jadb.test; package se.vidstige.jadb.test.unit;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;

View File

@ -1,4 +1,4 @@
package se.vidstige.jadb.test; package se.vidstige.jadb.test.unit;
import org.junit.After; import org.junit.After;
import org.junit.Assert; import org.junit.Assert;