diff options
Diffstat (limited to 'tests/projects/shared')
82 files changed, 741 insertions, 0 deletions
diff --git a/tests/projects/shared/multi-modules-sample/module_a/module_a1/pom.xml b/tests/projects/shared/multi-modules-sample/module_a/module_a1/pom.xml new file mode 100644 index 00000000000..b514c6ee0c7 --- /dev/null +++ b/tests/projects/shared/multi-modules-sample/module_a/module_a1/pom.xml @@ -0,0 +1,14 @@ +<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> + <artifactId>module_a1</artifactId> + <packaging>jar</packaging> + <name>Sub-module A1</name> + + <parent> + <groupId>com.sonarsource.it.samples</groupId> + <artifactId>module_a</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + +</project>
\ No newline at end of file diff --git a/tests/projects/shared/multi-modules-sample/module_a/module_a1/src/main/java/com/sonar/it/samples/modules/a1/HelloA1.java b/tests/projects/shared/multi-modules-sample/module_a/module_a1/src/main/java/com/sonar/it/samples/modules/a1/HelloA1.java new file mode 100644 index 00000000000..7471eaf64a9 --- /dev/null +++ b/tests/projects/shared/multi-modules-sample/module_a/module_a1/src/main/java/com/sonar/it/samples/modules/a1/HelloA1.java @@ -0,0 +1,16 @@ +package com.sonar.it.samples.modules.a1; + +public class HelloA1 { + private int i; + private HelloA1() { + + } + + public void hello() { + System.out.println("hello" + " world"); + } + + protected String getHello() { + return "hello"; + } +}
\ No newline at end of file diff --git a/tests/projects/shared/multi-modules-sample/module_a/module_a2/pom.xml b/tests/projects/shared/multi-modules-sample/module_a/module_a2/pom.xml new file mode 100644 index 00000000000..c9bc3ce46db --- /dev/null +++ b/tests/projects/shared/multi-modules-sample/module_a/module_a2/pom.xml @@ -0,0 +1,13 @@ +<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> + <artifactId>module_a2</artifactId> + <packaging>jar</packaging> + <name>Sub-module A2</name> + + <parent> + <groupId>com.sonarsource.it.samples</groupId> + <artifactId>module_a</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> +</project>
\ No newline at end of file diff --git a/tests/projects/shared/multi-modules-sample/module_a/module_a2/src/main/java/com/sonar/it/samples/modules/a2/HelloA2.java b/tests/projects/shared/multi-modules-sample/module_a/module_a2/src/main/java/com/sonar/it/samples/modules/a2/HelloA2.java new file mode 100644 index 00000000000..3d767d9500a --- /dev/null +++ b/tests/projects/shared/multi-modules-sample/module_a/module_a2/src/main/java/com/sonar/it/samples/modules/a2/HelloA2.java @@ -0,0 +1,12 @@ +package com.sonar.it.samples.modules.a2; + +public class HelloA2 { + private int i; + private HelloA2() { + + } + + public void hello() { + System.out.println("hello" + " world"); + } +}
\ No newline at end of file diff --git a/tests/projects/shared/multi-modules-sample/module_a/pom.xml b/tests/projects/shared/multi-modules-sample/module_a/pom.xml new file mode 100644 index 00000000000..793fbcf8420 --- /dev/null +++ b/tests/projects/shared/multi-modules-sample/module_a/pom.xml @@ -0,0 +1,17 @@ +<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> + <artifactId>module_a</artifactId> + <packaging>pom</packaging> + <name>Module A</name> + + <parent> + <groupId>com.sonarsource.it.samples</groupId> + <artifactId>multi-modules-sample</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + <modules> + <module>module_a1</module> + <module>module_a2</module> + </modules> +</project>
\ No newline at end of file diff --git a/tests/projects/shared/multi-modules-sample/module_b/module_b1/pom.xml b/tests/projects/shared/multi-modules-sample/module_b/module_b1/pom.xml new file mode 100644 index 00000000000..dc2cc52447f --- /dev/null +++ b/tests/projects/shared/multi-modules-sample/module_b/module_b1/pom.xml @@ -0,0 +1,14 @@ +<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> + <artifactId>module_b1</artifactId> + <packaging>jar</packaging> + <name>Sub-module B1</name> + + <parent> + <groupId>com.sonarsource.it.samples</groupId> + <artifactId>module_b</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + +</project>
\ No newline at end of file diff --git a/tests/projects/shared/multi-modules-sample/module_b/module_b1/src/main/java/com/sonar/it/samples/modules/b1/HelloB1.java b/tests/projects/shared/multi-modules-sample/module_b/module_b1/src/main/java/com/sonar/it/samples/modules/b1/HelloB1.java new file mode 100644 index 00000000000..b83c3af128c --- /dev/null +++ b/tests/projects/shared/multi-modules-sample/module_b/module_b1/src/main/java/com/sonar/it/samples/modules/b1/HelloB1.java @@ -0,0 +1,12 @@ +package com.sonar.it.samples.modules.b1; + +public class HelloB1 { + private int i; + private HelloB1() { + + } + + public void hello() { + System.out.println("hello" + " world"); + } +}
\ No newline at end of file diff --git a/tests/projects/shared/multi-modules-sample/module_b/module_b2/pom.xml b/tests/projects/shared/multi-modules-sample/module_b/module_b2/pom.xml new file mode 100644 index 00000000000..9ed7337e659 --- /dev/null +++ b/tests/projects/shared/multi-modules-sample/module_b/module_b2/pom.xml @@ -0,0 +1,14 @@ +<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> + <artifactId>module_b2</artifactId> + <packaging>jar</packaging> + <name>Sub-module B2</name> + + <parent> + <groupId>com.sonarsource.it.samples</groupId> + <artifactId>module_b</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + +</project>
\ No newline at end of file diff --git a/tests/projects/shared/multi-modules-sample/module_b/module_b2/src/main/java/com/sonar/it/samples/modules/b2/HelloB2.java b/tests/projects/shared/multi-modules-sample/module_b/module_b2/src/main/java/com/sonar/it/samples/modules/b2/HelloB2.java new file mode 100644 index 00000000000..20b8bb3876a --- /dev/null +++ b/tests/projects/shared/multi-modules-sample/module_b/module_b2/src/main/java/com/sonar/it/samples/modules/b2/HelloB2.java @@ -0,0 +1,12 @@ +package com.sonar.it.samples.modules.b2; + +public class HelloB2 { + private int i; + private HelloB2() { + + } + + public void hello() { + System.out.println("hello" + " world"); + } +}
\ No newline at end of file diff --git a/tests/projects/shared/multi-modules-sample/module_b/pom.xml b/tests/projects/shared/multi-modules-sample/module_b/pom.xml new file mode 100644 index 00000000000..2259da3ef66 --- /dev/null +++ b/tests/projects/shared/multi-modules-sample/module_b/pom.xml @@ -0,0 +1,17 @@ +<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> + <artifactId>module_b</artifactId> + <packaging>pom</packaging> + <name>Module B</name> + + <parent> + <groupId>com.sonarsource.it.samples</groupId> + <artifactId>multi-modules-sample</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + <modules> + <module>module_b1</module> + <module>module_b2</module> + </modules> +</project>
\ No newline at end of file diff --git a/tests/projects/shared/multi-modules-sample/pom.xml b/tests/projects/shared/multi-modules-sample/pom.xml new file mode 100644 index 00000000000..21db9df608a --- /dev/null +++ b/tests/projects/shared/multi-modules-sample/pom.xml @@ -0,0 +1,28 @@ +<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>com.sonarsource.it.samples</groupId> + <artifactId>multi-modules-sample</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>pom</packaging> + <name>Sonar :: Integration Tests :: Multi-modules Sample</name> + + <modules> + <module>module_a</module> + <module>module_b</module> + </modules> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> + + + <properties> + <sonar.language>java</sonar.language> + </properties> +</project> diff --git a/tests/projects/shared/multi-modules-sample/sonar-project.properties b/tests/projects/shared/multi-modules-sample/sonar-project.properties new file mode 100644 index 00000000000..9e2528c95b9 --- /dev/null +++ b/tests/projects/shared/multi-modules-sample/sonar-project.properties @@ -0,0 +1,16 @@ +sonar.projectKey=multi-modules-sample +sonar.projectName=Multi-modules Sample +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/java +sonar.language=java + +sonar.modules=module_a,module_b +module_a.sonar.projectName=Module A +module_a.sonar.modules=module_a1,module_a2 +module_a.module_a1.sonar.projectName=Sub-module A1 +module_a.module_a2.sonar.projectName=Sub-module A2 +module_b.sonar.projectName=Module B +module_b.sonar.modules=module_b1,module_b2 +module_b.module_b1.sonar.projectName=Sub-module B1 +module_b.module_b2.sonar.projectName=Sub-module B2 + diff --git a/tests/projects/shared/xoo-history-v1/sonar-project.properties b/tests/projects/shared/xoo-history-v1/sonar-project.properties new file mode 100644 index 00000000000..ede32ccb043 --- /dev/null +++ b/tests/projects/shared/xoo-history-v1/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=sample +sonar.projectName=Sample +sonar.projectVersion=0.9-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo
\ No newline at end of file diff --git a/tests/projects/shared/xoo-history-v1/src/main/xoo/sample/ClassToModify.xoo b/tests/projects/shared/xoo-history-v1/src/main/xoo/sample/ClassToModify.xoo new file mode 100644 index 00000000000..2b0288fc971 --- /dev/null +++ b/tests/projects/shared/xoo-history-v1/src/main/xoo/sample/ClassToModify.xoo @@ -0,0 +1,12 @@ +package sample; + +public class ClassToModify { + + public ClassToModify(int i) { + int j = i++; + } + + private String myMethod() { + return "hello"; + } +} diff --git a/tests/projects/shared/xoo-history-v1/src/main/xoo/sample/ClassToModify.xoo.measures b/tests/projects/shared/xoo-history-v1/src/main/xoo/sample/ClassToModify.xoo.measures new file mode 100644 index 00000000000..0861ac725c3 --- /dev/null +++ b/tests/projects/shared/xoo-history-v1/src/main/xoo/sample/ClassToModify.xoo.measures @@ -0,0 +1,4 @@ +ncloc:12 +classes:1 +complexity:3 +complexity_in_classes:3 diff --git a/tests/projects/shared/xoo-history-v1/src/main/xoo/sample/UnchangedClass.xoo b/tests/projects/shared/xoo-history-v1/src/main/xoo/sample/UnchangedClass.xoo new file mode 100644 index 00000000000..2b0288fc971 --- /dev/null +++ b/tests/projects/shared/xoo-history-v1/src/main/xoo/sample/UnchangedClass.xoo @@ -0,0 +1,12 @@ +package sample; + +public class ClassToModify { + + public ClassToModify(int i) { + int j = i++; + } + + private String myMethod() { + return "hello"; + } +} diff --git a/tests/projects/shared/xoo-history-v1/src/main/xoo/sample/UnchangedClass.xoo.measures b/tests/projects/shared/xoo-history-v1/src/main/xoo/sample/UnchangedClass.xoo.measures new file mode 100644 index 00000000000..0861ac725c3 --- /dev/null +++ b/tests/projects/shared/xoo-history-v1/src/main/xoo/sample/UnchangedClass.xoo.measures @@ -0,0 +1,4 @@ +ncloc:12 +classes:1 +complexity:3 +complexity_in_classes:3 diff --git a/tests/projects/shared/xoo-history-v2/sonar-project.properties b/tests/projects/shared/xoo-history-v2/sonar-project.properties new file mode 100644 index 00000000000..e01f062e51b --- /dev/null +++ b/tests/projects/shared/xoo-history-v2/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=sample +sonar.projectName=Sample +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo
\ No newline at end of file diff --git a/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/ClassAdded.xoo b/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/ClassAdded.xoo new file mode 100644 index 00000000000..b0fd1087030 --- /dev/null +++ b/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/ClassAdded.xoo @@ -0,0 +1,12 @@ +package sample; + +public class ClassAdded { + + public ClassAdded(int i) { + int j = i++; + } + + private String myMethod() { + return "hello"; + } +} diff --git a/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/ClassAdded.xoo.measures b/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/ClassAdded.xoo.measures new file mode 100644 index 00000000000..0861ac725c3 --- /dev/null +++ b/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/ClassAdded.xoo.measures @@ -0,0 +1,4 @@ +ncloc:12 +classes:1 +complexity:3 +complexity_in_classes:3 diff --git a/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/ClassToModify.xoo b/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/ClassToModify.xoo new file mode 100644 index 00000000000..393111bbab0 --- /dev/null +++ b/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/ClassToModify.xoo @@ -0,0 +1,16 @@ +package sample; + +public class ClassToModify { + + public ClassToModify(int i) { + int j = i++; + } + + public String addedMethod() { + return "This method was added in v2"; + } + + private String myMethod() { + return "hello"; + } +} diff --git a/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/ClassToModify.xoo.measures b/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/ClassToModify.xoo.measures new file mode 100644 index 00000000000..5de11af72ed --- /dev/null +++ b/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/ClassToModify.xoo.measures @@ -0,0 +1,4 @@ +ncloc:16 +classes:1 +complexity:5 +complexity_in_classes:4 diff --git a/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/UnchangedClass.xoo b/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/UnchangedClass.xoo new file mode 100644 index 00000000000..2b0288fc971 --- /dev/null +++ b/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/UnchangedClass.xoo @@ -0,0 +1,12 @@ +package sample; + +public class ClassToModify { + + public ClassToModify(int i) { + int j = i++; + } + + private String myMethod() { + return "hello"; + } +} diff --git a/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/UnchangedClass.xoo.measures b/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/UnchangedClass.xoo.measures new file mode 100644 index 00000000000..0861ac725c3 --- /dev/null +++ b/tests/projects/shared/xoo-history-v2/src/main/xoo/sample/UnchangedClass.xoo.measures @@ -0,0 +1,4 @@ +ncloc:12 +classes:1 +complexity:3 +complexity_in_classes:3 diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a1/sonar-project.properties b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a1/sonar-project.properties new file mode 100644 index 00000000000..a081a0e6342 --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a1/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectName=Sub-module A1 diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo new file mode 100644 index 00000000000..74d29a4fa08 --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo @@ -0,0 +1,16 @@ +package com.sonar.it.samples.modules.a1; + +public class HelloA1 { + private int i; + private HelloA1() { + + } + + public void hello() { + System.out.println("hello" + " xoo"); + } + + protected String getHello() { + return "hello"; + } +}
\ No newline at end of file diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo.measures b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo.measures new file mode 100644 index 00000000000..7812e4167fb --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo.measures @@ -0,0 +1,2 @@ +ncloc:12 +classes:1 diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a2/sonar-project.properties b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a2/sonar-project.properties new file mode 100644 index 00000000000..fcedab83843 --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a2/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectName=Sub-module A2 diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo new file mode 100644 index 00000000000..796d90cfad5 --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo @@ -0,0 +1,20 @@ +package com.sonar.it.samples.modules.a2; + +public class HelloA2 { + + public HelloA2(int i) { + int j = i++; + } + + public void hello() { + System.out.println("hello" + " xoo"); + } + + private String myMethod() { + if (foo == bar) { + return "hello"; + } else { + throw new IllegalStateException(); + } + } +} diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo.measures b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo.measures new file mode 100644 index 00000000000..63df5add6d4 --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo.measures @@ -0,0 +1,2 @@ +ncloc:15 +classes:1 diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/sonar-project.properties b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/sonar-project.properties new file mode 100644 index 00000000000..7e6ca9074a4 --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_a/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=module_a +sonar.projectName=Module A + +sonar.modules=module_a1,module_a2 diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo new file mode 100644 index 00000000000..b83c3af128c --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo @@ -0,0 +1,12 @@ +package com.sonar.it.samples.modules.b1; + +public class HelloB1 { + private int i; + private HelloB1() { + + } + + public void hello() { + System.out.println("hello" + " world"); + } +}
\ No newline at end of file diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo.measures b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo.measures new file mode 100644 index 00000000000..3947d3bdbff --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo.measures @@ -0,0 +1,2 @@ +ncloc:12 +classes:1
\ No newline at end of file diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b2/sonar-project.properties b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b2/sonar-project.properties new file mode 100644 index 00000000000..e597dab4f33 --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b2/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectName=Sub-module B2 diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo new file mode 100644 index 00000000000..20b8bb3876a --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo @@ -0,0 +1,12 @@ +package com.sonar.it.samples.modules.b2; + +public class HelloB2 { + private int i; + private HelloB2() { + + } + + public void hello() { + System.out.println("hello" + " world"); + } +}
\ No newline at end of file diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo.measures b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo.measures new file mode 100644 index 00000000000..3947d3bdbff --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo.measures @@ -0,0 +1,2 @@ +ncloc:12 +classes:1
\ No newline at end of file diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/sonar-project.properties b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/sonar-project.properties new file mode 100644 index 00000000000..7bc39b44133 --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/module_b/sonar-project.properties @@ -0,0 +1,3 @@ +sonar.projectKey=module_b + +sonar.modules=module_b1,module_b2 diff --git a/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/sonar-project.properties b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/sonar-project.properties new file mode 100644 index 00000000000..074304998f5 --- /dev/null +++ b/tests/projects/shared/xoo-multi-module-sample-without-project-name-version/sonar-project.properties @@ -0,0 +1,10 @@ +# Root project information +sonar.projectKey=com.sonarsource.it.samples:multi-modules-sample + +sonar.language=xoo + +# Some properties that will be inherited by the modules +sonar.sources=src/main/xoo + +# List of the module identifiers +sonar.modules=module_a,module_b diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a1/sonar-project.properties b/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a1/sonar-project.properties new file mode 100644 index 00000000000..a081a0e6342 --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a1/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectName=Sub-module A1 diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo b/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo new file mode 100644 index 00000000000..74d29a4fa08 --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo @@ -0,0 +1,16 @@ +package com.sonar.it.samples.modules.a1; + +public class HelloA1 { + private int i; + private HelloA1() { + + } + + public void hello() { + System.out.println("hello" + " xoo"); + } + + protected String getHello() { + return "hello"; + } +}
\ No newline at end of file diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo.measures b/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo.measures new file mode 100644 index 00000000000..f3953ccd0fe --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a1/src/main/xoo/com/sonar/it/samples/modules/a1/HelloA1.xoo.measures @@ -0,0 +1,4 @@ +ncloc:12 +classes:1 +complexity:3 +cognitive_complexity:4 diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a2/sonar-project.properties b/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a2/sonar-project.properties new file mode 100644 index 00000000000..fcedab83843 --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a2/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectName=Sub-module A2 diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo b/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo new file mode 100644 index 00000000000..796d90cfad5 --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo @@ -0,0 +1,20 @@ +package com.sonar.it.samples.modules.a2; + +public class HelloA2 { + + public HelloA2(int i) { + int j = i++; + } + + public void hello() { + System.out.println("hello" + " xoo"); + } + + private String myMethod() { + if (foo == bar) { + return "hello"; + } else { + throw new IllegalStateException(); + } + } +} diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo.measures b/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo.measures new file mode 100644 index 00000000000..a23e10d8ab4 --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_a/module_a2/src/main/xoo/com/sonar/it/samples/modules/a2/HelloA2.xoo.measures @@ -0,0 +1,5 @@ +ncloc:15 +classes:1 +complexity:4 +cognitive_complexity:5 + diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_a/sonar-project.properties b/tests/projects/shared/xoo-multi-modules-sample/module_a/sonar-project.properties new file mode 100644 index 00000000000..7e6ca9074a4 --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_a/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=module_a +sonar.projectName=Module A + +sonar.modules=module_a1,module_a2 diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b1/sonar-project.properties b/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b1/sonar-project.properties new file mode 100644 index 00000000000..ca8404b7bd4 --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b1/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectName=Sub-module B1 diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo b/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo new file mode 100644 index 00000000000..b83c3af128c --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo @@ -0,0 +1,12 @@ +package com.sonar.it.samples.modules.b1; + +public class HelloB1 { + private int i; + private HelloB1() { + + } + + public void hello() { + System.out.println("hello" + " world"); + } +}
\ No newline at end of file diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo.measures b/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo.measures new file mode 100644 index 00000000000..f3953ccd0fe --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b1/src/main/xoo/com/sonar/it/samples/modules/b1/HelloB1.xoo.measures @@ -0,0 +1,4 @@ +ncloc:12 +classes:1 +complexity:3 +cognitive_complexity:4 diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b2/sonar-project.properties b/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b2/sonar-project.properties new file mode 100644 index 00000000000..e597dab4f33 --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b2/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectName=Sub-module B2 diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo b/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo new file mode 100644 index 00000000000..20b8bb3876a --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo @@ -0,0 +1,12 @@ +package com.sonar.it.samples.modules.b2; + +public class HelloB2 { + private int i; + private HelloB2() { + + } + + public void hello() { + System.out.println("hello" + " world"); + } +}
\ No newline at end of file diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo.measures b/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo.measures new file mode 100644 index 00000000000..f3953ccd0fe --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_b/module_b2/src/main/xoo/com/sonar/it/samples/modules/b2/HelloB2.xoo.measures @@ -0,0 +1,4 @@ +ncloc:12 +classes:1 +complexity:3 +cognitive_complexity:4 diff --git a/tests/projects/shared/xoo-multi-modules-sample/module_b/sonar-project.properties b/tests/projects/shared/xoo-multi-modules-sample/module_b/sonar-project.properties new file mode 100644 index 00000000000..21d69f769d3 --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/module_b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=module_b +sonar.projectName=Module B + +sonar.modules=module_b1,module_b2 diff --git a/tests/projects/shared/xoo-multi-modules-sample/sonar-project.properties b/tests/projects/shared/xoo-multi-modules-sample/sonar-project.properties new file mode 100644 index 00000000000..7935cb5ffb0 --- /dev/null +++ b/tests/projects/shared/xoo-multi-modules-sample/sonar-project.properties @@ -0,0 +1,12 @@ +# Root project information +sonar.projectKey=com.sonarsource.it.samples:multi-modules-sample +sonar.projectName=Sonar :: Integration Tests :: Multi-modules Sample +sonar.projectVersion=1.0-SNAPSHOT + +sonar.language=xoo + +# Some properties that will be inherited by the modules +sonar.sources=src/main/xoo + +# List of the module identifiers +sonar.modules=module_a,module_b diff --git a/tests/projects/shared/xoo-precise-issues/sonar-project.properties b/tests/projects/shared/xoo-precise-issues/sonar-project.properties new file mode 100644 index 00000000000..1a7b22bbc15 --- /dev/null +++ b/tests/projects/shared/xoo-precise-issues/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=sample-multiline +sonar.projectName=Sample Multiline +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo diff --git a/tests/projects/shared/xoo-precise-issues/src/main/xoo/sample/Sample.xoo b/tests/projects/shared/xoo-precise-issues/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..56ce09970af --- /dev/null +++ b/tests/projects/shared/xoo-precise-issues/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,16 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j {xoo-start-issue:0}= i++{xoo-end-issue:0}; + } + + {xoo-start-issue:1}private String myMethod() { + if (foo == bar) { + return "hello"; + } else { + throw new IllegalStateException(); + } + }{xoo-end-issue:1} +} diff --git a/tests/projects/shared/xoo-sample-module-move-v1/module_a/sonar-project.properties b/tests/projects/shared/xoo-sample-module-move-v1/module_a/sonar-project.properties new file mode 100644 index 00000000000..627ee34d167 --- /dev/null +++ b/tests/projects/shared/xoo-sample-module-move-v1/module_a/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=module_a +sonar.projectName=Module A +# mandatory to reproduce the problem +sonar.moduleKey=module_a diff --git a/tests/projects/shared/xoo-sample-module-move-v1/module_a/src/main/xoo/sample/Sample.xoo b/tests/projects/shared/xoo-sample-module-move-v1/module_a/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/tests/projects/shared/xoo-sample-module-move-v1/module_a/src/main/xoo/sample/Sample.xoo @@ -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/xoo-sample-module-move-v1/module_a/src/main/xoo/sample/Sample.xoo.measures b/tests/projects/shared/xoo-sample-module-move-v1/module_a/src/main/xoo/sample/Sample.xoo.measures new file mode 100644 index 00000000000..641332a5013 --- /dev/null +++ b/tests/projects/shared/xoo-sample-module-move-v1/module_a/src/main/xoo/sample/Sample.xoo.measures @@ -0,0 +1,8 @@ +ncloc:13 +#Used by dashboard/widgets tests +complexity:3 +complexity_in_classes:3 +classes:1 +comment_lines:3 +public_api:5 +public_undocumented_api:2 diff --git a/tests/projects/shared/xoo-sample-module-move-v1/sonar-project.properties b/tests/projects/shared/xoo-sample-module-move-v1/sonar-project.properties new file mode 100644 index 00000000000..80a6207ca5c --- /dev/null +++ b/tests/projects/shared/xoo-sample-module-move-v1/sonar-project.properties @@ -0,0 +1,12 @@ +# Root project information +sonar.projectKey=sample +sonar.projectName=Sample +sonar.projectVersion=1.0-SNAPSHOT + +sonar.language=xoo + +# Some properties that will be inherited by the modules +sonar.sources=src/main/xoo + +# List of the module identifiers +sonar.modules=module_a diff --git a/tests/projects/shared/xoo-sample-module-move-v2/new_module/module_a/sonar-project.properties b/tests/projects/shared/xoo-sample-module-move-v2/new_module/module_a/sonar-project.properties new file mode 100644 index 00000000000..627ee34d167 --- /dev/null +++ b/tests/projects/shared/xoo-sample-module-move-v2/new_module/module_a/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=module_a +sonar.projectName=Module A +# mandatory to reproduce the problem +sonar.moduleKey=module_a diff --git a/tests/projects/shared/xoo-sample-module-move-v2/new_module/module_a/src/main/xoo/sample/Sample.xoo b/tests/projects/shared/xoo-sample-module-move-v2/new_module/module_a/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/tests/projects/shared/xoo-sample-module-move-v2/new_module/module_a/src/main/xoo/sample/Sample.xoo @@ -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/xoo-sample-module-move-v2/new_module/module_a/src/main/xoo/sample/Sample.xoo.measures b/tests/projects/shared/xoo-sample-module-move-v2/new_module/module_a/src/main/xoo/sample/Sample.xoo.measures new file mode 100644 index 00000000000..641332a5013 --- /dev/null +++ b/tests/projects/shared/xoo-sample-module-move-v2/new_module/module_a/src/main/xoo/sample/Sample.xoo.measures @@ -0,0 +1,8 @@ +ncloc:13 +#Used by dashboard/widgets tests +complexity:3 +complexity_in_classes:3 +classes:1 +comment_lines:3 +public_api:5 +public_undocumented_api:2 diff --git a/tests/projects/shared/xoo-sample-module-move-v2/new_module/sonar-project.properties b/tests/projects/shared/xoo-sample-module-move-v2/new_module/sonar-project.properties new file mode 100644 index 00000000000..22721e824fa --- /dev/null +++ b/tests/projects/shared/xoo-sample-module-move-v2/new_module/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=new_module +sonar.projectName=New Module + +sonar.modules=module_a diff --git a/tests/projects/shared/xoo-sample-module-move-v2/sonar-project.properties b/tests/projects/shared/xoo-sample-module-move-v2/sonar-project.properties new file mode 100644 index 00000000000..ce727e4ea81 --- /dev/null +++ b/tests/projects/shared/xoo-sample-module-move-v2/sonar-project.properties @@ -0,0 +1,12 @@ +# Root project information +sonar.projectKey=sample +sonar.projectName=Sample +sonar.projectVersion=1.0-SNAPSHOT + +sonar.language=xoo + +# Some properties that will be inherited by the modules +sonar.sources=src/main/xoo + +# List of the module identifiers +sonar.modules=new_module diff --git a/tests/projects/shared/xoo-sample-non-associated/sonar-project.properties b/tests/projects/shared/xoo-sample-non-associated/sonar-project.properties new file mode 100644 index 00000000000..71b83e48b9f --- /dev/null +++ b/tests/projects/shared/xoo-sample-non-associated/sonar-project.properties @@ -0,0 +1,5 @@ +#sonar.projectKey=sample +sonar.projectName=Sample +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo diff --git a/tests/projects/shared/xoo-sample-non-associated/src/main/xoo/sample/Sample.xoo b/tests/projects/shared/xoo-sample-non-associated/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/tests/projects/shared/xoo-sample-non-associated/src/main/xoo/sample/Sample.xoo @@ -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/xoo-sample-non-associated/src/main/xoo/sample/Sample.xoo.measures b/tests/projects/shared/xoo-sample-non-associated/src/main/xoo/sample/Sample.xoo.measures new file mode 100644 index 00000000000..641332a5013 --- /dev/null +++ b/tests/projects/shared/xoo-sample-non-associated/src/main/xoo/sample/Sample.xoo.measures @@ -0,0 +1,8 @@ +ncloc:13 +#Used by dashboard/widgets tests +complexity:3 +complexity_in_classes:3 +classes:1 +comment_lines:3 +public_api:5 +public_undocumented_api:2 diff --git a/tests/projects/shared/xoo-sample-with-root-dir/Hello.xoo b/tests/projects/shared/xoo-sample-with-root-dir/Hello.xoo new file mode 100644 index 00000000000..b83c3af128c --- /dev/null +++ b/tests/projects/shared/xoo-sample-with-root-dir/Hello.xoo @@ -0,0 +1,12 @@ +package com.sonar.it.samples.modules.b1; + +public class HelloB1 { + private int i; + private HelloB1() { + + } + + public void hello() { + System.out.println("hello" + " world"); + } +}
\ No newline at end of file diff --git a/tests/projects/shared/xoo-sample-with-root-dir/sonar-project.properties b/tests/projects/shared/xoo-sample-with-root-dir/sonar-project.properties new file mode 100644 index 00000000000..35fbcff0e60 --- /dev/null +++ b/tests/projects/shared/xoo-sample-with-root-dir/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=sample-with-root-dir +sonar.projectName=Sample With Root Dir +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=. +sonar.language=xoo diff --git a/tests/projects/shared/xoo-sample-with-root-dir/src/main/xoo/sample/Sample.xoo b/tests/projects/shared/xoo-sample-with-root-dir/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/tests/projects/shared/xoo-sample-with-root-dir/src/main/xoo/sample/Sample.xoo @@ -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/xoo-sample-with-root-dir/src/main/xoo/sample/Sample.xoo.measures b/tests/projects/shared/xoo-sample-with-root-dir/src/main/xoo/sample/Sample.xoo.measures new file mode 100644 index 00000000000..641332a5013 --- /dev/null +++ b/tests/projects/shared/xoo-sample-with-root-dir/src/main/xoo/sample/Sample.xoo.measures @@ -0,0 +1,8 @@ +ncloc:13 +#Used by dashboard/widgets tests +complexity:3 +complexity_in_classes:3 +classes:1 +comment_lines:3 +public_api:5 +public_undocumented_api:2 diff --git a/tests/projects/shared/xoo-sample-with-tests/sonar-project.properties b/tests/projects/shared/xoo-sample-with-tests/sonar-project.properties new file mode 100644 index 00000000000..0f2415d0320 --- /dev/null +++ b/tests/projects/shared/xoo-sample-with-tests/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=sample-with-tests +sonar.projectName=Sample with tests +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.tests=src/test/xoo +sonar.language=xoo
\ No newline at end of file diff --git a/tests/projects/shared/xoo-sample-with-tests/src/main/xoo/sample/Sample.xoo b/tests/projects/shared/xoo-sample-with-tests/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..b1210973dd9 --- /dev/null +++ b/tests/projects/shared/xoo-sample-with-tests/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,12 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j = i++; + } + + private String myMethod() { + return "hello"; + } +} diff --git a/tests/projects/shared/xoo-sample-with-tests/src/main/xoo/sample/Sample.xoo.measures b/tests/projects/shared/xoo-sample-with-tests/src/main/xoo/sample/Sample.xoo.measures new file mode 100644 index 00000000000..c427258db4e --- /dev/null +++ b/tests/projects/shared/xoo-sample-with-tests/src/main/xoo/sample/Sample.xoo.measures @@ -0,0 +1,5 @@ +ncloc:13 +#Used by dashboard/widgets tests +complexity_in_classes:3 +classes:1 +comment_lines:0 diff --git a/tests/projects/shared/xoo-sample-with-tests/src/test/xoo/sample/SampleTest.xoo b/tests/projects/shared/xoo-sample-with-tests/src/test/xoo/sample/SampleTest.xoo new file mode 100644 index 00000000000..1392fc64ebf --- /dev/null +++ b/tests/projects/shared/xoo-sample-with-tests/src/test/xoo/sample/SampleTest.xoo @@ -0,0 +1,21 @@ +package sample; + +import org.hamcrest.CoreMatchers; +import org.junit.Test; + +import static org.junit.Assert.assertThat; + +public class SampleTest { + + @Test + public void should_return_i() { + Sample sample = new Sample(1); + assertThat(sample.getI(), CoreMatchers.is(1)); + } + + @Test + public void should_return_to_string() { + assertThat(new Sample(1).toString(), CoreMatchers.is("1")); + } + +} diff --git a/tests/projects/shared/xoo-sample-with-tests/src/test/xoo/sample/SampleTest.xoo.measures b/tests/projects/shared/xoo-sample-with-tests/src/test/xoo/sample/SampleTest.xoo.measures new file mode 100644 index 00000000000..5a3f14e5962 --- /dev/null +++ b/tests/projects/shared/xoo-sample-with-tests/src/test/xoo/sample/SampleTest.xoo.measures @@ -0,0 +1,6 @@ +ncloc:22 +tests:2 +test_execution_time:1 +skipped_tests:0 +test_errors:0 +test_failures:0
\ No newline at end of file diff --git a/tests/projects/shared/xoo-sample/sonar-project.properties b/tests/projects/shared/xoo-sample/sonar-project.properties new file mode 100644 index 00000000000..9e4aa0e3584 --- /dev/null +++ b/tests/projects/shared/xoo-sample/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=sample +sonar.projectName=Sample +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo diff --git a/tests/projects/shared/xoo-sample/src/main/xoo/sample/Sample.xoo b/tests/projects/shared/xoo-sample/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..41871e123a3 --- /dev/null +++ b/tests/projects/shared/xoo-sample/src/main/xoo/sample/Sample.xoo @@ -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/xoo-sample/src/main/xoo/sample/Sample.xoo.measures b/tests/projects/shared/xoo-sample/src/main/xoo/sample/Sample.xoo.measures new file mode 100644 index 00000000000..06c9b6c2f38 --- /dev/null +++ b/tests/projects/shared/xoo-sample/src/main/xoo/sample/Sample.xoo.measures @@ -0,0 +1,9 @@ +ncloc:13 +#Used by dashboard/widgets tests +complexity:3 +complexity_in_classes:3 +cognitive_complexity:4 +classes:1 +comment_lines:3 +public_api:5 +public_undocumented_api:2 diff --git a/tests/projects/shared/xoo-two-letters-named/sonar-project.properties b/tests/projects/shared/xoo-two-letters-named/sonar-project.properties new file mode 100644 index 00000000000..c0ebb39302f --- /dev/null +++ b/tests/projects/shared/xoo-two-letters-named/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=xo +sonar.projectName=xo +sonar.projectVersion=1.0-SNAPSHOT +sonar.sources=src/main/xoo +sonar.language=xoo
\ No newline at end of file diff --git a/tests/projects/shared/xoo-two-letters-named/src/main/xoo/sample/Sample.xoo b/tests/projects/shared/xoo-two-letters-named/src/main/xoo/sample/Sample.xoo new file mode 100644 index 00000000000..b1210973dd9 --- /dev/null +++ b/tests/projects/shared/xoo-two-letters-named/src/main/xoo/sample/Sample.xoo @@ -0,0 +1,12 @@ +package sample; + +public class Sample { + + public Sample(int i) { + int j = i++; + } + + private String myMethod() { + return "hello"; + } +} diff --git a/tests/projects/shared/xoo-two-letters-named/src/main/xoo/sample/Sample.xoo.measures b/tests/projects/shared/xoo-two-letters-named/src/main/xoo/sample/Sample.xoo.measures new file mode 100644 index 00000000000..56acf8077d6 --- /dev/null +++ b/tests/projects/shared/xoo-two-letters-named/src/main/xoo/sample/Sample.xoo.measures @@ -0,0 +1 @@ +ncloc:9 |