]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5189 Fix UT of CountUnresolvedIssuesDecorator
authorJulien HENRY <julien.henry@sonarsource.com>
Thu, 24 Apr 2014 10:43:43 +0000 (12:43 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Thu, 24 Apr 2014 10:43:43 +0000 (12:43 +0200)
plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/CountUnresolvedIssuesDecoratorTest.java

index 4ee5cb5934ba4603110c6aefa4023c2a69e6af57..600f455ca21dd4f504a5aed457aa727105132aa0 100644 (file)
@@ -92,9 +92,9 @@ public class CountUnresolvedIssuesDecoratorTest {
     ruleB1 = Rule.create().setRepositoryKey("ruleB1").setKey("ruleB1").setName("nameB1");
 
     ruleFinder = mock(RuleFinder.class);
-    when(ruleFinder.findByKey(ruleA1.getRepositoryKey(), ruleA1.getKey())).thenReturn(ruleA1);
-    when(ruleFinder.findByKey(ruleA2.getRepositoryKey(), ruleA2.getKey())).thenReturn(ruleA2);
-    when(ruleFinder.findByKey(ruleB1.getRepositoryKey(), ruleB1.getKey())).thenReturn(ruleB1);
+    when(ruleFinder.findByKey(ruleA1.ruleKey())).thenReturn(ruleA1);
+    when(ruleFinder.findByKey(ruleA2.ruleKey())).thenReturn(ruleA2);
+    when(ruleFinder.findByKey(ruleB1.ruleKey())).thenReturn(ruleB1);
 
     rightNow = new Date();
     tenDaysAgo = DateUtils.addDays(rightNow, -10);