TestUtils.getResource(this.getClass(), "simple-project/libs/lib2.txt").getAbsolutePath());
}
+ @Test
+ public void shouldDefineSimpleProjectWithDeprecatedProperties() throws IOException {
+ ProjectDefinition projectDefinition = loadProjectDefinition("simple-project-with-deprecated-props");
+
+ assertThat(projectDefinition.getSourceDirs()).contains("sources");
+ assertThat(projectDefinition.getTestDirs()).contains("tests");
+ assertThat(projectDefinition.getBinaries()).contains("target/classes");
+ assertThat(projectDefinition.getLibraries()).contains(
+ TestUtils.getResource(this.getClass(), "simple-project-with-deprecated-props/libs/lib2.txt").getAbsolutePath(),
+ TestUtils.getResource(this.getClass(), "simple-project-with-deprecated-props/libs/lib2.txt").getAbsolutePath());
+ }
+
@Test
public void shouldFailIfUnexistingSourceDirectory() throws IOException {
thrown.expect(RunnerException.class);
sonar.projectVersion=1.0-SNAPSHOT
sonar.projectDescription=Description of Foo Project
-sources=sources
-tests=tests
-binaries=target/classes
+sonar.sources=sources
+sonar.tests=tests
+sonar.binaries=target/classes
sonar.modules=module1
sonar.projectVersion=1.0-SNAPSHOT
sonar.projectDescription=Description of Foo Project
-sources=sources
-tests=tests
-binaries=target/classes
+sonar.sources=sources
+sonar.tests=tests
+sonar.binaries=target/classes
sonar.modules=module1
sonar.projectVersion=1.0-SNAPSHOT
sonar.projectDescription=Description of Foo Project
-sources=sources
-tests=tests
-binaries=target/classes
+sonar.sources=sources
+sonar.tests=tests
+sonar.binaries=target/classes
sonar.modules=module1
sonar.projectVersion=1.0-SNAPSHOT
sonar.projectDescription=Description of Foo Project
-sources=sources
-tests=tests
-binaries=target/classes
+sonar.sources=sources
+sonar.tests=tests
+sonar.binaries=target/classes
sonar.modules=module1
sonar.projectVersion=1.0-SNAPSHOT
sonar.projectDescription=Description of Foo Project
-sources=sources
-tests=tests
-binaries=target/classes
+sonar.sources=sources
+sonar.tests=tests
+sonar.binaries=target/classes
sonar.modules=module1,\
module2
module2.sonar.projectName=Foo Module 2
# redefine some properties
module2.sonar.projectDescription=Description of Module 2
-module2.sources=src
+module2.sonar.sources=src
--- /dev/null
+lib1
\ No newline at end of file
--- /dev/null
+lib2
\ No newline at end of file
--- /dev/null
+sonar.projectKey=com.foo.project
+sonar.projectName=Foo Project
+sonar.projectVersion=1.0-SNAPSHOT
+sonar.projectDescription=Description of Foo Project
+
+# Those are the deprecated properties
+sources=sources
+tests=tests
+binaries=target/classes
+libraries=libs/*.txt
--- /dev/null
+Fake
\ No newline at end of file
sonar.projectVersion=1.0-SNAPSHOT
sonar.projectDescription=Description of Foo Project
-sources=unexisting-source-dir
+sonar.sources=unexisting-source-dir
sonar.projectVersion=1.0-SNAPSHOT
sonar.projectDescription=Description of Foo Project
-sources=sources
-tests=tests
-binaries=target/classes
-libraries=libs/*.txt
+sonar.sources=sources
+sonar.tests=tests
+sonar.binaries=target/classes
+sonar.libraries=libs/*.txt