aboutsummaryrefslogtreecommitdiffstats
path: root/tests/projects
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2017-08-29 18:41:42 +0200
committerTeryk Bellahsene <teryk@users.noreply.github.com>2017-08-30 16:24:53 +0200
commitff5e58a204e214d5639525be8f94ab26f83b50e0 (patch)
treea8290719b1853f2ea1a15f13a9d94bd33f68c023 /tests/projects
parent0d26a88c087cb3e7b9428c83221c90a53ae9d186 (diff)
downloadsonarqube-ff5e58a204e214d5639525be8f94ab26f83b50e0.tar.gz
sonarqube-ff5e58a204e214d5639525be8f94ab26f83b50e0.zip
SONAR-9721 IT to test telemetry content
Diffstat (limited to 'tests/projects')
-rw-r--r--tests/projects/shared/xoo2-sample/sonar-project.properties4
-rw-r--r--tests/projects/shared/xoo2-sample/src/main/xoo/sample/Sample.xoo216
-rw-r--r--tests/projects/shared/xoo2-sample/src/main/xoo/sample/Sample.xoo2.measures9
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/projects/shared/xoo2-sample/sonar-project.properties b/tests/projects/shared/xoo2-sample/sonar-project.properties
new file mode 100644
index 00000000000..bd0c385337e
--- /dev/null
+++ b/tests/projects/shared/xoo2-sample/sonar-project.properties
@@ -0,0 +1,4 @@
+sonar.projectKey=sample
+sonar.projectName=Xoo2 Sample
+sonar.projectVersion=1.0-SNAPSHOT
+sonar.sources=src/main/xoo
diff --git a/tests/projects/shared/xoo2-sample/src/main/xoo/sample/Sample.xoo2 b/tests/projects/shared/xoo2-sample/src/main/xoo/sample/Sample.xoo2
new file mode 100644
index 00000000000..41871e123a3
--- /dev/null
+++ b/tests/projects/shared/xoo2-sample/src/main/xoo/sample/Sample.xoo2
@@ -0,0 +1,16 @@
+package sample;
+
+public class Sample {
+
+ public Sample(int i) {
+ int j = i++;
+ }
+
+ private String myMethod() {
+ if (foo == bar) {
+ return "hello";
+ } else {
+ throw new IllegalStateException();
+ }
+ }
+}
diff --git a/tests/projects/shared/xoo2-sample/src/main/xoo/sample/Sample.xoo2.measures b/tests/projects/shared/xoo2-sample/src/main/xoo/sample/Sample.xoo2.measures
new file mode 100644
index 00000000000..7cd61febe22
--- /dev/null
+++ b/tests/projects/shared/xoo2-sample/src/main/xoo/sample/Sample.xoo2.measures
@@ -0,0 +1,9 @@
+ncloc:7
+#Used by dashboard/widgets tests
+complexity:4
+complexity_in_classes:5
+cognitive_complexity:6
+classes:2
+comment_lines:4
+public_api:6
+public_undocumented_api:1