diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-05-27 09:38:17 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-05-28 09:29:03 +0200 |
commit | 57c01be1943a882a5a2fe0cc0fecab2fe75a861a (patch) | |
tree | 3d1240ef670ddedd00cf6b0450e72ef418cbc78e /sonar-batch/src/test/resources | |
parent | d228fadfa0c0cc7284d4920c9bb485049ff3f68f (diff) | |
download | sonarqube-57c01be1943a882a5a2fe0cc0fecab2fe75a861a.tar.gz sonarqube-57c01be1943a882a5a2fe0cc0fecab2fe75a861a.zip |
SONAR-6370 move batch extensions out of core plugin
Decorators temporarily moved to package org.sonar.batch.compute of sonar-batch.
Diffstat (limited to 'sonar-batch/src/test/resources')
12 files changed, 275 insertions, 0 deletions
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/compute/ManualMeasureDecoratorTest/testCopyManualMeasures.xml b/sonar-batch/src/test/resources/org/sonar/batch/compute/ManualMeasureDecoratorTest/testCopyManualMeasures.xml new file mode 100644 index 00000000000..0307f16e6e3 --- /dev/null +++ b/sonar-batch/src/test/resources/org/sonar/batch/compute/ManualMeasureDecoratorTest/testCopyManualMeasures.xml @@ -0,0 +1,11 @@ +<dataset> + <metrics delete_historical_data="[null]" id="1" NAME="ncloc" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name="" + enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/> + <metrics delete_historical_data="[null]" id="2" NAME="review_note" VAL_TYPE="INT" DESCRIPTION="[null]" domain="[null]" short_name="" + enabled="true" worst_value="[null]" optimized_best_value="[null]" best_value="[null]" direction="0" hidden="false"/> + + + <manual_measures id="1" metric_id="2" resource_id="30" value="3.14" text_value="pi" created_at="[null]" updated_at="[null]" description="this is pi" user_login="me"/> + <manual_measures id="2" metric_id="2" resource_id="40" value="6" text_value="six" created_at="[null]" updated_at="[null]" description="this is six" user_login="me"/> + +</dataset>
\ No newline at end of file diff --git a/sonar-batch/src/test/resources/org/sonar/batch/compute/ProjectLinksSensorTest/shouldDeleteMissingLinks.xml b/sonar-batch/src/test/resources/org/sonar/batch/compute/ProjectLinksSensorTest/shouldDeleteMissingLinks.xml new file mode 100644 index 00000000000..836bb4630e9 --- /dev/null +++ b/sonar-batch/src/test/resources/org/sonar/batch/compute/ProjectLinksSensorTest/shouldDeleteMissingLinks.xml @@ -0,0 +1,10 @@ +<?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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar</artifactId> + <packaging>pom</packaging> + <version>1.8-SNAPSHOT</version> + +</project>
\ No newline at end of file diff --git a/sonar-batch/src/test/resources/org/sonar/batch/compute/ProjectLinksSensorTest/shouldSaveLinks.xml b/sonar-batch/src/test/resources/org/sonar/batch/compute/ProjectLinksSensorTest/shouldSaveLinks.xml new file mode 100644 index 00000000000..a44ea429019 --- /dev/null +++ b/sonar-batch/src/test/resources/org/sonar/batch/compute/ProjectLinksSensorTest/shouldSaveLinks.xml @@ -0,0 +1,51 @@ +<?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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar</artifactId> + <packaging>pom</packaging> + <version>1.8-SNAPSHOT</version> + <url>http://sonar.codehaus.org</url> + + <organization> + <name>SonarSource SA</name> + <url>http://www.sonarsource.com</url> + </organization> + <inceptionYear>2009</inceptionYear> + + <issueManagement> + <system>jira</system> + <url>http://jira.codehaus.org/browse/SONAR</url> + </issueManagement> + + <mailingLists> + <mailingList> + <name>Sonar users mailing list</name> + <subscribe>http://xircles.codehaus.org/projects/sonar/lists</subscribe> + <unsubscribe>http://xircles.codehaus.org/projects/sonar/lists</unsubscribe> + <post>user@sonar.codehaus.org</post> + <archive>http://www.nabble.com/Sonar-f30151.html</archive> + </mailingList> + </mailingLists> + + <scm> + <connection>scm:svn:http://svn.codehaus.org/sonar/trunk</connection> + <developerConnection>scm:svn:https://svn.codehaus.org/sonar/trunk</developerConnection> + <url>http://svn.sonar.codehaus.org</url> + </scm> + + <ciManagement> + <system>bamboo</system> + <url>http://bamboo.ci.codehaus.org/browse/SONAR/</url> + </ciManagement> + + <licenses> + <license> + <name>GNU Lesser General Public License (LGPL), v.3</name> + <url>http://www.gnu.org/licenses/lgpl.txt</url> + <distribution>repo</distribution> + </license> + </licenses> + +</project>
\ No newline at end of file diff --git a/sonar-batch/src/test/resources/org/sonar/batch/compute/TimeMachineConfigurationPersisterTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/compute/TimeMachineConfigurationPersisterTest/shared.xml new file mode 100644 index 00000000000..70c8178d4e8 --- /dev/null +++ b/sonar-batch/src/test/resources/org/sonar/batch/compute/TimeMachineConfigurationPersisterTest/shared.xml @@ -0,0 +1,42 @@ +<dataset> + <snapshots purge_status="[null]" + period1_mode="[null]" period1_param="[null]" period1_date="[null]" + period2_mode="[null]" period2_param="[null]" period2_date="[null]" + period3_mode="[null]" period3_param="[null]" period3_date="[null]" + period4_mode="[null]" period4_param="[null]" period4_date="[null]" + period5_mode="[null]" period5_param="[null]" period5_date="[null]" + id="100" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" + scope="PRJ" qualifier="TRK" created_at="1225544280000" build_date="1225544280000" version="[null]" path="" + status="P" islast="false" depth="0" /> + + <snapshots purge_status="[null]" + period1_mode="[null]" period1_param="[null]" period1_date="[null]" + period2_mode="[null]" period2_param="[null]" period2_date="[null]" + period3_mode="[null]" period3_param="[null]" period3_date="[null]" + period4_mode="[null]" period4_param="[null]" period4_date="[null]" + period5_mode="[null]" period5_param="[null]" period5_date="[null]" + id="200" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" + scope="PRJ" qualifier="TRK" created_at="1229345880000" build_date="1229345880000" version="[null]" path="" + status="P" islast="false" depth="0" /> + + <!-- Snapshot of previous version --> + <snapshots purge_status="[null]" + period1_mode="[null]" period1_param="[null]" period1_date="[null]" + period2_mode="[null]" period2_param="[null]" period2_date="[null]" + period3_mode="[null]" period3_param="[null]" period3_date="[null]" + period4_mode="[null]" period4_param="[null]" period4_date="[null]" + period5_mode="[null]" period5_param="[null]" period5_date="[null]" + id="300" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" + scope="PRJ" qualifier="TRK" created_at="1229173080000" build_date="1229173080000" version="1.2.3" path="" + status="P" islast="false" depth="0" /> + + <snapshots purge_status="[null]" + period1_mode="[null]" period1_param="[null]" period1_date="[null]" + period2_mode="[null]" period2_param="[null]" period2_date="[null]" + period3_mode="[null]" period3_param="[null]" period3_date="[null]" + period4_mode="[null]" period4_param="[null]" period4_date="[null]" + period5_mode="[null]" period5_param="[null]" period5_date="[null]" + id="1000" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" + scope="PRJ" qualifier="TRK" created_at="1235566680000" build_date="1235566680000" version="[null]" path="" + status="P" islast="false" depth="0" /> +</dataset> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/compute/TimeMachineConfigurationPersisterTest/shouldSaveConfigurationInSnapshotsTable-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/compute/TimeMachineConfigurationPersisterTest/shouldSaveConfigurationInSnapshotsTable-result.xml new file mode 100644 index 00000000000..34fdf2d4d32 --- /dev/null +++ b/sonar-batch/src/test/resources/org/sonar/batch/compute/TimeMachineConfigurationPersisterTest/shouldSaveConfigurationInSnapshotsTable-result.xml @@ -0,0 +1,42 @@ +<dataset> + <snapshots purge_status="[null]" + period1_mode="[null]" period1_param="[null]" period1_date="[null]" + period2_mode="[null]" period2_param="[null]" period2_date="[null]" + period3_mode="[null]" period3_param="[null]" period3_date="[null]" + period4_mode="[null]" period4_param="[null]" period4_date="[null]" + period5_mode="[null]" period5_param="[null]" period5_date="[null]" + id="100" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" + scope="PRJ" qualifier="TRK" created_at="1225544280000" build_date="1225544280000" version="[null]" path="" + status="P" islast="false" depth="0" /> + + <snapshots purge_status="[null]" + period1_mode="[null]" period1_param="[null]" period1_date="[null]" + period2_mode="[null]" period2_param="[null]" period2_date="[null]" + period3_mode="[null]" period3_param="[null]" period3_date="[null]" + period4_mode="[null]" period4_param="[null]" period4_date="[null]" + period5_mode="[null]" period5_param="[null]" period5_date="[null]" + id="200" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" + scope="PRJ" qualifier="TRK" created_at="1229345880000" build_date="1229345880000" version="[null]" path="" + status="P" islast="false" depth="0" /> + + <!-- Snapshot of previous version --> + <snapshots purge_status="[null]" + period1_mode="[null]" period1_param="[null]" period1_date="[null]" + period2_mode="[null]" period2_param="[null]" period2_date="[null]" + period3_mode="[null]" period3_param="[null]" period3_date="[null]" + period4_mode="[null]" period4_param="[null]" period4_date="[null]" + period5_mode="[null]" period5_param="[null]" period5_date="[null]" + id="300" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" + scope="PRJ" qualifier="TRK" created_at="1229173080000" build_date="1229173080000" version="1.2.3" path="" + status="P" islast="false" depth="0" /> + + <snapshots purge_status="[null]" + period1_mode="days" period1_param="30" period1_date="1225544280000" + period2_mode="[null]" period2_param="[null]" period2_date="[null]" + period3_mode="version" period3_param="1.2.3" period3_date="1229173080000" + period4_mode="[null]" period4_param="[null]" period4_date="[null]" + period5_mode="[null]" period5_param="[null]" period5_date="[null]" + id="1000" project_id="1" parent_snapshot_id="[null]" root_project_id="1" root_snapshot_id="[null]" + scope="PRJ" qualifier="TRK" created_at="1235566680000" build_date="1235566680000" version="[null]" path="" + status="P" islast="false" depth="0" /> +</dataset> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationPersisterDecoratorTest/shared.xml b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationPersisterDecoratorTest/shared.xml new file mode 100644 index 00000000000..519ce8d5157 --- /dev/null +++ b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationPersisterDecoratorTest/shared.xml @@ -0,0 +1,21 @@ +<dataset> + + <rules tags="[null]" system_tags="[null]" id="30" name="Check Header" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck" + plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY" + is_template="[false]" template_id="[null]"/> + + <rules tags="[null]" system_tags="[null]" id="31" name="Equals Avoid Null" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck" + plugin_config_key="Checker/TreeWalker/EqualsAvoidNull" plugin_name="checkstyle" description="[null]" priority="4" status="READY" + is_template="[false]" template_id="[null]"/> + + <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]" + name="Bar" long_name="org.foo.Bar" description="[null]" + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" /> + + <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" + period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" + id="1000" project_id="200" parent_snapshot_id="[null]" root_project_id="100" root_snapshot_id="[null]" + scope="FIL" qualifier="CLA" created_at="1225544280000" build_date="1225544280000" version="[null]" path="" + status="U" islast="false" depth="3"/> + +</dataset> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml new file mode 100644 index 00000000000..061041849aa --- /dev/null +++ b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationPersisterDecoratorTest/shouldCopyPermanentIdFromReferenceViolation-result.xml @@ -0,0 +1,21 @@ +<dataset> + + <rules tags="[null]" system_tags="[null]" id="30" name="Check Header" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck" + plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY" + is_template="[false]" template_id="[null]"/> + + <rules tags="[null]" system_tags="[null]" id="31" name="Equals Avoid Null" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck" + plugin_config_key="Checker/TreeWalker/EqualsAvoidNull" plugin_name="checkstyle" description="[null]" priority="4" status="READY" + is_template="[false]" template_id="[null]"/> + + <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]" + name="Bar" long_name="org.foo.Bar" description="[null]" + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" /> + + <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" + period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1000" project_id="200" + parent_snapshot_id="[null]" root_project_id="100" root_snapshot_id="[null]" + scope="FIL" qualifier="CLA" created_at="1225544280000" build_date="1225544280000" version="[null]" path="" + status="U" islast="false" depth="3"/> + +</dataset> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml new file mode 100644 index 00000000000..f1bbc0bda6f --- /dev/null +++ b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationPersisterDecoratorTest/shouldSaveViolations-result.xml @@ -0,0 +1,20 @@ +<dataset> + <rules tags="[null]" system_tags="[null]" id="30" name="Check Header" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck" + plugin_config_key="Checker/Treewalker/HeaderCheck" plugin_name="checkstyle" description="[null]" priority="4" status="READY" + is_template="[false]" template_id="[null]"/> + + <rules tags="[null]" system_tags="[null]" id="31" name="Equals Avoid Null" plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck" + plugin_config_key="Checker/TreeWalker/EqualsAvoidNull" plugin_name="checkstyle" description="[null]" priority="4" status="READY" + is_template="[false]" template_id="[null]"/> + + <projects id="200" scope="FIL" qualifier="CLA" kee="project:org.foo.Bar" root_id="[null]" + name="Bar" long_name="org.foo.Bar" description="[null]" + enabled="true" language="java" copy_resource_id="[null]" person_id="[null]" /> + + <snapshots purge_status="[null]" period1_mode="[null]" period1_param="[null]" period1_date="[null]" period2_mode="[null]" period2_param="[null]" period2_date="[null]" period3_mode="[null]" period3_param="[null]" + period3_date="[null]" period4_mode="[null]" period4_param="[null]" period4_date="[null]" period5_mode="[null]" period5_param="[null]" period5_date="[null]" id="1000" project_id="200" + parent_snapshot_id="[null]" root_project_id="100" root_snapshot_id="[null]" + scope="FIL" qualifier="CLA" created_at="1225544280000" build_date="1225544280000" version="[null]" path="" + status="U" islast="false" depth="3"/> + +</dataset> diff --git a/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationTrackingTest/example1-v1.txt b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationTrackingTest/example1-v1.txt new file mode 100644 index 00000000000..1920333ddb6 --- /dev/null +++ b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationTrackingTest/example1-v1.txt @@ -0,0 +1,12 @@ +package example1; + +public class Toto { + + public void doSomething() { + // doSomething + } + + public void doSomethingElse() { + // doSomethingElse + } +} diff --git a/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationTrackingTest/example1-v2.txt b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationTrackingTest/example1-v2.txt new file mode 100644 index 00000000000..231532452b2 --- /dev/null +++ b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationTrackingTest/example1-v2.txt @@ -0,0 +1,22 @@ +package example1; + +public class Toto { + + public Toto(){} + + public void doSomethingNew() { + // doSomethingNew + } + + public void doSomethingElseNew() { + // doSomethingElseNew + } + + public void doSomething() { + // doSomething + } + + public void doSomethingElse() { + // doSomethingElse + } +} diff --git a/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationTrackingTest/example2-v1.txt b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationTrackingTest/example2-v1.txt new file mode 100644 index 00000000000..a920afe459b --- /dev/null +++ b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationTrackingTest/example2-v1.txt @@ -0,0 +1,7 @@ +package example2; + +public class Toto { + void method1() { + System.out.println("toto"); + } +} diff --git a/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationTrackingTest/example2-v2.txt b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationTrackingTest/example2-v2.txt new file mode 100644 index 00000000000..c5c8250cf65 --- /dev/null +++ b/sonar-batch/src/test/resources/org/sonar/batch/compute/ViolationTrackingTest/example2-v2.txt @@ -0,0 +1,16 @@ +package example2; + +public class Toto { + + void method2() { + System.out.println("toto"); + } + + void method1() { + System.out.println("toto"); + } + + void method3() { + System.out.println("toto"); + } +} |