aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2017-10-17 10:46:50 +0200
committerTeryk Bellahsene <teryk@users.noreply.github.com>2017-10-19 12:12:11 +0200
commit224b4c237c4383fb9c7eb21758dcb613e801fefe (patch)
treea71a41e3ec5713c1005477de61d9da5209190609 /sonar-core
parent9de3767d3f6776e8004ea273d412cc4b748a7c15 (diff)
downloadsonarqube-224b4c237c4383fb9c7eb21758dcb613e801fefe.tar.gz
sonarqube-224b4c237c4383fb9c7eb21758dcb613e801fefe.zip
SONAR-8331 Rename Complexity to Cyclomatic Complexity
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties2
-rw-r--r--sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java11
2 files changed, 4 insertions, 9 deletions
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index a6f52214b65..970c8424246 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -1497,7 +1497,7 @@ metric.comment_lines_density.description=Comments balanced by ncloc + comment li
metric.comment_lines_density.name=Comments (%)
metric.comment_lines_density.short_name=Comments
metric.complexity.description=Cyclomatic complexity
-metric.complexity.name=Complexity
+metric.complexity.name=Cyclomatic Complexity
metric.complexity_in_classes.description=Cyclomatic complexity in classes
metric.complexity_in_classes.name=Complexity in Classes
metric.complexity_in_functions.description=Cyclomatic complexity in functions
diff --git a/sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java b/sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java
index e310d4c97ff..2f2ac8e820e 100644
--- a/sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/i18n/DefaultI18nTest.java
@@ -26,13 +26,10 @@ import java.util.Locale;
import java.util.TimeZone;
import org.junit.Before;
import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.Metric;
import org.sonar.api.utils.DateUtils;
-import org.sonar.api.utils.System2;
+import org.sonar.api.utils.internal.TestSystem2;
import org.sonar.core.platform.PluginInfo;
import org.sonar.core.platform.PluginRepository;
@@ -40,11 +37,9 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-@RunWith(MockitoJUnitRunner.class)
public class DefaultI18nTest {
- @Mock
- System2 system2;
+ private TestSystem2 system2 = new TestSystem2();
DefaultI18n underTest;
@@ -189,7 +184,7 @@ public class DefaultI18nTest {
@Test
public void get_age_from_now() {
- when(system2.now()).thenReturn(DateUtils.parseDate("2014-01-02").getTime());
+ system2.setNow(DateUtils.parseDate("2014-01-02").getTime());
assertThat(underTest.ageFromNow(Locale.ENGLISH, DateUtils.parseDate("2014-01-01"))).isEqualTo("a day");
}