summaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2014-07-22 15:35:39 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2014-07-22 15:37:25 +0200
commite2067be4a3ecbbdcbd1aca0edeade851e9f67b24 (patch)
tree8014a7c9db77bba554be9b3a3228a64eac4c2c4e /sonar-batch
parent65efdc4567dcf920abc85042b758bf8a2ecf893a (diff)
downloadsonarqube-e2067be4a3ecbbdcbd1aca0edeade851e9f67b24.tar.gz
sonarqube-e2067be4a3ecbbdcbd1aca0edeade851e9f67b24.zip
Fix RulesProfile UT.
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java b/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java
index 26331f5e0b7..e4fb7f396f8 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/rule/RulesProfileProviderTest.java
@@ -21,6 +21,7 @@ package org.sonar.batch.rule;
import org.junit.Test;
import org.sonar.api.batch.rule.ActiveRules;
+import org.sonar.api.batch.rule.internal.ActiveRulesBuilder;
import org.sonar.api.config.Settings;
import org.sonar.api.profiles.RulesProfile;
import org.sonar.api.rules.RuleFinder;
@@ -35,7 +36,7 @@ import static org.mockito.Mockito.when;
public class RulesProfileProviderTest {
ModuleQProfiles qProfiles = mock(ModuleQProfiles.class);
- ActiveRules activeRules = mock(ActiveRules.class);
+ ActiveRules activeRules = new ActiveRulesBuilder().build();
RuleFinder ruleFinder = mock(RuleFinder.class);
Settings settings = new Settings();
RulesProfileProvider provider = new RulesProfileProvider();
@@ -72,6 +73,7 @@ public class RulesProfileProviderTest {
// no merge, directly the old hibernate profile
assertThat(profile).isNotNull();
assertThat(profile.getLanguage()).isEqualTo("java");
- assertThat(profile.getName()).isEqualTo("Sonar way");;
+ assertThat(profile.getName()).isEqualTo("Sonar way");
+ ;
}
}