aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-db
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-09-04 15:00:13 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-09-08 18:12:22 +0200
commit0bc2180be6cc7dea6f2bb74b573818af1f121389 (patch)
tree04547ea333699a8cf411f361adddd762ee399e46 /sonar-db
parent00ddcf2a1369a17728d10ffeddb58ea1a0b60151 (diff)
downloadsonarqube-0bc2180be6cc7dea6f2bb74b573818af1f121389.tar.gz
sonarqube-0bc2180be6cc7dea6f2bb74b573818af1f121389.zip
fix ComponentTesting: Subview in table PROJECTS have no path
Diffstat (limited to 'sonar-db')
-rw-r--r--sonar-db/src/test/java/org/sonar/db/component/ComponentTesting.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentTesting.java b/sonar-db/src/test/java/org/sonar/db/component/ComponentTesting.java
index 043608fe0a9..11c3cebbc8c 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentTesting.java
+++ b/sonar-db/src/test/java/org/sonar/db/component/ComponentTesting.java
@@ -55,12 +55,11 @@ public class ComponentTesting {
.setQualifier(Qualifiers.DIRECTORY);
}
- public static ComponentDto newSubView(ComponentDto viewOrSubView, String uuid, String path) {
+ public static ComponentDto newSubView(ComponentDto viewOrSubView, String uuid, String key) {
return newChildComponent(uuid, viewOrSubView)
- .setKey(!path.equals("/") ? viewOrSubView.getKey() + ":" + path : viewOrSubView.getKey() + ":/")
- .setName(path)
- .setLongName(path)
- .setPath(path)
+ .setKey(key)
+ .setName(key)
+ .setLongName(key)
.setScope(Scopes.PROJECT)
.setQualifier(Qualifiers.SUBVIEW);
}