aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-07-01 16:40:43 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-07-01 16:41:04 +0200
commitd223c5ded79b36396ad2b4b16dbbe1dd2dc24cd1 (patch)
treedae952a9f10660f4fba3636d64c034023238026e /sonar-core
parente7b58a71656a61b36449afdd76ba4eaacc44f950 (diff)
downloadsonarqube-d223c5ded79b36396ad2b4b16dbbe1dd2dc24cd1.tar.gz
sonarqube-d223c5ded79b36396ad2b4b16dbbe1dd2dc24cd1.zip
Fix some quality flaws
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java b/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java
index b2248c80ee6..2e372c4261c 100644
--- a/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java
@@ -20,6 +20,8 @@
package org.sonar.core.component;
import org.junit.Test;
+import org.sonar.api.batch.fs.InputFile;
+import org.sonar.api.batch.fs.internal.DefaultInputFile;
import org.sonar.api.resources.Directory;
import org.sonar.api.resources.Library;
import org.sonar.api.resources.Project;
@@ -38,6 +40,9 @@ public class ComponentKeysTest {
Library library = new Library("junit:junit", "4.7");
assertThat(ComponentKeys.createEffectiveKey(project, library)).isEqualTo("junit:junit");
+
+ InputFile file = new DefaultInputFile("foo/Bar.php");
+ assertThat(ComponentKeys.createEffectiveKey("my_project", file)).isEqualTo("my_project:foo/Bar.php");
}
@Test