aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src/test
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-01-31 01:55:26 +0300
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-01-31 02:33:07 +0300
commitb57d1e3fa0e8c0fb15d408eb7729da9823ac3540 (patch)
tree21c19dbb9d88a2b5e4643f83e8edf41701849c48 /sonar-batch/src/test
parent120178b6ad76ad422727e3ae44f0ebaa851c0da0 (diff)
downloadsonarqube-b57d1e3fa0e8c0fb15d408eb7729da9823ac3540.tar.gz
sonarqube-b57d1e3fa0e8c0fb15d408eb7729da9823ac3540.zip
Add properties "sonar.projectName" and "sonar.projectDescription"
Diffstat (limited to 'sonar-batch/src/test')
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/InMemoryPomCreatorTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/InMemoryPomCreatorTest.java b/sonar-batch/src/test/java/org/sonar/batch/InMemoryPomCreatorTest.java
index 83550c40c0d..260e6846d69 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/InMemoryPomCreatorTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/InMemoryPomCreatorTest.java
@@ -54,6 +54,8 @@ public class InMemoryPomCreatorTest {
assertThat(pom.getBasedir(), is(project.getBaseDir()));
assertThat(pom.getGroupId(), is("org.example"));
assertThat(pom.getArtifactId(), is("example"));
+ assertThat(pom.getName(), is("Unnamed - org.example:example"));
+ assertThat(pom.getDescription(), is(""));
assertThat(pom.getProperties(), is(project.getProperties()));
assertThat(pom.getBasedir(), is(project.getBaseDir()));
String buildDirectory = project.getWorkDir().getAbsolutePath() + "/target";
@@ -63,6 +65,19 @@ public class InMemoryPomCreatorTest {
}
@Test
+ public void nameAndDescription() {
+ createRequiredProperties();
+
+ properties.setProperty(CoreProperties.PROJECT_NAME_PROPERTY, "Foo");
+ properties.setProperty(CoreProperties.PROJECT_DESCRIPTION_PROPERTY, "Bar");
+
+ MavenProject pom = create();
+
+ assertThat(pom.getName(), is("Foo"));
+ assertThat(pom.getDescription(), is("Bar"));
+ }
+
+ @Test
public void sourceDirectories() {
createRequiredProperties();
properties.setProperty("sonar.projectBinaries", "junit.jar");