test2
This commit is contained in:
21
module1/pom.xml
Normal file
21
module1/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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.sonarqube</groupId>
|
||||
<artifactId>sonarscanner-maven-aggregate</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>module1</artifactId>
|
||||
|
||||
<name>Module 1</name>
|
||||
|
||||
<properties>
|
||||
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
|
||||
</properties>
|
||||
|
||||
|
||||
</project>
|
||||
17
module1/src/main/java/com/acme/module1/Module1.java
Normal file
17
module1/src/main/java/com/acme/module1/Module1.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.acme.module1;
|
||||
|
||||
public class Module1 {
|
||||
|
||||
public void coveredByUnitTest() {
|
||||
System.out.println("This method is covered by unit test");
|
||||
}
|
||||
|
||||
public void coveredByIntegrationTest() {
|
||||
System.out.println("This method is covered by integration test");
|
||||
}
|
||||
|
||||
public void uncovered() {
|
||||
System.out.println("This method is not covered");
|
||||
}
|
||||
|
||||
}
|
||||
12
module1/src/test/java/com/acme/module1/Module1Test.java
Normal file
12
module1/src/test/java/com/acme/module1/Module1Test.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package com.acme.module1;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class Module1Test {
|
||||
|
||||
@Test
|
||||
public void coveredByUnitTest() {
|
||||
Module1 module1 = new Module1();
|
||||
module1.coveredByUnitTest();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user