-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #448 from sarahBuisson/aggregationModule
Adds additional report-aggregate-module mojo
- Loading branch information
Showing
11 changed files
with
428 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
pitest-maven-verification/src/test/resources/pit-sub-module/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.example</groupId> | ||
<artifactId>pit-parent-module</artifactId> | ||
<packaging>pom</packaging> | ||
<version>1.0-SNAPSHOT</version> | ||
<name>pit-parent-module</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>${junit.version}</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.4</version> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.pitest</groupId> | ||
<artifactId>pitest-maven</artifactId> | ||
<version>${pit.version}</version> | ||
<configuration> | ||
<timestampedReports>false</timestampedReports> | ||
<outputFormats> | ||
<outputFormat>HTML</outputFormat> | ||
<!-- xml is used by the report aggregate --> | ||
<outputFormat>XML</outputFormat> | ||
</outputFormats> | ||
<!-- exportLineCoverage is used by the report aggregate --> | ||
<exportLineCoverage>true</exportLineCoverage> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
|
||
|
||
<properties> | ||
<junit.version>4.8.1</junit.version> | ||
</properties> | ||
<modules> | ||
<module>sub-module-1</module> | ||
<module>sub-module-2</module> | ||
</modules> | ||
</project> |
37 changes: 37 additions & 0 deletions
37
pitest-maven-verification/src/test/resources/pit-sub-module/sub-module-1/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.example</groupId> | ||
<artifactId>pit-parent-module</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<groupId>org.pitest</groupId> | ||
<artifactId>sub-module-1</artifactId> | ||
<packaging>jar</packaging> | ||
<version>1.0-SNAPSHOT</version> | ||
<name>sub-module 1</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>${junit.version}</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
<properties> | ||
<junit.version>4.8.1</junit.version> | ||
</properties> | ||
</project> |
24 changes: 24 additions & 0 deletions
24
...est/resources/pit-sub-module/sub-module-1/src/main/java/org/example1/SystemUnderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.example1; | ||
|
||
public class SystemUnderTest { | ||
|
||
private int aNumber = 0; | ||
|
||
public SystemUnderTest() { | ||
super(); | ||
|
||
int a = 25; | ||
int b = 10; | ||
if (a < b) { | ||
aNumber = 10; | ||
} else { | ||
aNumber = -25; | ||
} | ||
} | ||
|
||
public String toString() { | ||
return "SystemUnderTest"; | ||
} | ||
|
||
|
||
} |
21 changes: 21 additions & 0 deletions
21
...est/resources/pit-sub-module/sub-module-1/src/test/java/org/example1/FileOpeningTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.example1; | ||
|
||
import static junit.framework.Assert.assertTrue; | ||
import static junit.framework.Assert.assertNotNull; | ||
|
||
import java.io.File; | ||
import org.junit.Test; | ||
|
||
public class FileOpeningTest { | ||
|
||
@Test | ||
public void testOpenFileRelativeToWorkingDirectory() { | ||
SystemUnderTest sut = new SystemUnderTest(); | ||
|
||
File file = new File("src/test/resources/fixture.file"); | ||
assertTrue(file.exists()); | ||
assertNotNull(sut.toString()); | ||
} | ||
|
||
|
||
} |
1 change: 1 addition & 0 deletions
1
...rification/src/test/resources/pit-sub-module/sub-module-1/src/test/resources/fixture.file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test123 |
37 changes: 37 additions & 0 deletions
37
pitest-maven-verification/src/test/resources/pit-sub-module/sub-module-2/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.example</groupId> | ||
<artifactId>pit-parent-module</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<groupId>org.pitest</groupId> | ||
<artifactId>sub-module-2</artifactId> | ||
<packaging>jar</packaging> | ||
<version>1.0-SNAPSHOT</version> | ||
<name>sub module2</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>${junit.version}</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
<properties> | ||
<junit.version>4.8.1</junit.version> | ||
</properties> | ||
</project> |
24 changes: 24 additions & 0 deletions
24
...est/resources/pit-sub-module/sub-module-2/src/main/java/org/example2/SystemUnderTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.example2; | ||
|
||
public class SystemUnderTest { | ||
|
||
private int aNumber = 0; | ||
|
||
public SystemUnderTest() { | ||
super(); | ||
|
||
int a = 25; | ||
int b = 10; | ||
if (a < b) { | ||
aNumber = 10; | ||
} else { | ||
aNumber = -25; | ||
} | ||
} | ||
|
||
public String toString() { | ||
return "SystemUnderTest"; | ||
} | ||
|
||
|
||
} |
21 changes: 21 additions & 0 deletions
21
...est/resources/pit-sub-module/sub-module-2/src/test/java/org/example2/FileOpeningTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.example2; | ||
|
||
import static junit.framework.Assert.assertTrue; | ||
import static junit.framework.Assert.assertNotNull; | ||
|
||
import java.io.File; | ||
import org.junit.Test; | ||
|
||
public class FileOpeningTest { | ||
|
||
@Test | ||
public void testOpenFileRelativeToWorkingDirectory() { | ||
SystemUnderTest sut = new SystemUnderTest(); | ||
|
||
File file = new File("src/test/resources/fixture.file"); | ||
assertTrue(file.exists()); | ||
assertNotNull(sut.toString()); | ||
} | ||
|
||
|
||
} |
1 change: 1 addition & 0 deletions
1
...rification/src/test/resources/pit-sub-module/sub-module-2/src/test/resources/fixture.file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test123 |
Oops, something went wrong.