From e2067be4a3ecbbdcbd1aca0edeade851e9f67b24 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Tue, 22 Jul 2014 15:35:39 +0200 Subject: [PATCH] Fix RulesProfile UT. --- .../java/org/sonar/batch/rule/RulesProfileProviderTest.java | 6 ++++-- 1 file 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"); + ; } } -- 2.39.5