aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-db/src/test
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2015-07-09 14:16:47 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2015-07-16 12:02:21 +0200
commitf934d2e752010579ab72be6ca61993766a2e7951 (patch)
treeb6e4a398737fe7750eb70441644bdfba25a57327 /sonar-db/src/test
parentcbc7832b745ae07fee7a1f6200eb9aa8aa0a7c75 (diff)
downloadsonarqube-f934d2e752010579ab72be6ca61993766a2e7951.tar.gz
sonarqube-f934d2e752010579ab72be6ca61993766a2e7951.zip
SONAR-6702 Reactivate previously removed components
Diffstat (limited to 'sonar-db/src/test')
-rw-r--r--sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java b/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java
index 53715a0bf61..b1e97c6ea72 100644
--- a/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java
+++ b/sonar-db/src/test/java/org/sonar/db/component/ComponentDaoTest.java
@@ -420,23 +420,24 @@ public class ComponentDaoTest {
}
@Test
- public void select_components_from_project() {
+ public void select_all_components_from_project() {
db.prepareDbUnit(getClass(), "multi-modules.xml");
- List<ComponentDto> components = sut.selectComponentsFromProjectKey(db.getSession(), "org.struts:struts");
- assertThat(components).hasSize(5);
+ List<ComponentDto> components = sut.selectAllComponentsFromProjectKey(db.getSession(), "org.struts:struts");
+ // Removed components are included
+ assertThat(components).hasSize(8);
- assertThat(sut.selectComponentsFromProjectKey(db.getSession(), "UNKNOWN")).isEmpty();
+ assertThat(sut.selectAllComponentsFromProjectKey(db.getSession(), "UNKNOWN")).isEmpty();
}
@Test
public void select_modules_from_project() {
db.prepareDbUnit(getClass(), "multi-modules.xml");
- List<ComponentDto> components = sut.selectModulesFromProjectKey(db.getSession(), "org.struts:struts");
+ List<ComponentDto> components = sut.selectEnabledModulesFromProjectKey(db.getSession(), "org.struts:struts");
assertThat(components).hasSize(3);
- assertThat(sut.selectModulesFromProjectKey(db.getSession(), "UNKNOWN")).isEmpty();
+ assertThat(sut.selectEnabledModulesFromProjectKey(db.getSession(), "UNKNOWN")).isEmpty();
}
@Test