diff options
author | Aurelien <100427063+aurelien-poscia-sonarsource@users.noreply.github.com> | 2022-05-04 09:28:10 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-05-06 20:02:44 +0000 |
commit | 85249a5a2a2de92eb547be3825520a9dd5fd8ddf (patch) | |
tree | bb8b49ac3bb5217c28005715f7979319bf69d90c /server/sonar-webserver-pushapi | |
parent | 5cea1b86e42b9b71bd289ee35d4b376cb62e51c4 (diff) | |
download | sonarqube-85249a5a2a2de92eb547be3825520a9dd5fd8ddf.tar.gz sonarqube-85249a5a2a2de92eb547be3825520a9dd5fd8ddf.zip |
SONAR-16302 remove RuleDefinitionDto and put information in RuleDto
Diffstat (limited to 'server/sonar-webserver-pushapi')
-rw-r--r-- | server/sonar-webserver-pushapi/src/test/java/org/sonar/server/qualityprofile/builtin/QualityProfileChangeEventServiceImplTest.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/qualityprofile/builtin/QualityProfileChangeEventServiceImplTest.java b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/qualityprofile/builtin/QualityProfileChangeEventServiceImplTest.java index f96821ea009..a67e8ded258 100644 --- a/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/qualityprofile/builtin/QualityProfileChangeEventServiceImplTest.java +++ b/server/sonar-webserver-pushapi/src/test/java/org/sonar/server/qualityprofile/builtin/QualityProfileChangeEventServiceImplTest.java @@ -34,7 +34,6 @@ import org.sonar.db.qualityprofile.ActiveRuleDto; import org.sonar.db.qualityprofile.ActiveRuleParamDto; import org.sonar.db.qualityprofile.QProfileDto; import org.sonar.db.qualityprofile.QualityProfileTesting; -import org.sonar.db.rule.RuleDefinitionDto; import org.sonar.db.rule.RuleDto; import org.sonar.db.rule.RuleParamDto; import org.sonar.server.pushapi.qualityprofile.QualityProfileChangeEventServiceImpl; @@ -67,9 +66,9 @@ public class QualityProfileChangeEventServiceImplTest { // Template rule RuleDto templateRule = newTemplateRule(RuleKey.of("xoo", "template-key")); - db.rules().insert(templateRule.getDefinition()); + db.rules().insert(templateRule); // Custom rule - RuleDefinitionDto rule1 = newCustomRule(templateRule.getDefinition()) + RuleDto rule1 = newCustomRule(templateRule) .setLanguage("xoo") .setRepositoryKey("repo") .setRuleKey("ruleKey") @@ -119,7 +118,7 @@ public class QualityProfileChangeEventServiceImplTest { QProfileDto activatedQualityProfile = QualityProfileTesting.newQualityProfileDto(); activatedQualityProfile.setLanguage("xoo"); db.qualityProfiles().insert(activatedQualityProfile); - RuleDefinitionDto rule1 = db.rules().insert(r -> r.setLanguage("xoo").setRepositoryKey("repo").setRuleKey("ruleKey")); + RuleDto rule1 = db.rules().insert(r -> r.setLanguage("xoo").setRepositoryKey("repo").setRuleKey("ruleKey")); RuleParamDto rule1Param = db.rules().insertRuleParam(rule1); ActiveRuleDto activeRule1 = db.qualityProfiles().activateRule(activatedQualityProfile, rule1); @@ -129,7 +128,7 @@ public class QualityProfileChangeEventServiceImplTest { QProfileDto deactivatedQualityProfile = QualityProfileTesting.newQualityProfileDto(); db.qualityProfiles().insert(deactivatedQualityProfile); - RuleDefinitionDto rule2 = db.rules().insert(r -> r.setLanguage("xoo").setRepositoryKey("repo2").setRuleKey("ruleKey2")); + RuleDto rule2 = db.rules().insert(r -> r.setLanguage("xoo").setRepositoryKey("repo2").setRuleKey("ruleKey2")); RuleParamDto rule2Param = db.rules().insertRuleParam(rule2); ActiveRuleDto activeRule2 = db.qualityProfiles().activateRule(deactivatedQualityProfile, rule2); |