aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/test/java/org/sonar/batch
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2016-05-12 11:32:50 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2016-05-12 15:19:59 +0200
commitd8845c6f438cee268fa4268a6a6503c54330bdda (patch)
tree803c2e7a2ea656c2c7ef48562f9def70ad11a4cd /sonar-scanner-engine/src/test/java/org/sonar/batch
parent4c56e6c287c0ca07dba287a234759c5a32193ba7 (diff)
downloadsonarqube-d8845c6f438cee268fa4268a6a6503c54330bdda.tar.gz
sonarqube-d8845c6f438cee268fa4268a6a6503c54330bdda.zip
SONAR-7636 Deprecate org.sonar.api.measures.Measure + many small API improvements
Diffstat (limited to 'sonar-scanner-engine/src/test/java/org/sonar/batch')
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/batch/scan/measure/MeasureCacheTest.java2
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/batch/sensor/DefaultSensorContextTest.java4
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/batch/sensor/DefaultSensorStorageTest.java4
3 files changed, 5 insertions, 5 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/batch/scan/measure/MeasureCacheTest.java b/sonar-scanner-engine/src/test/java/org/sonar/batch/scan/measure/MeasureCacheTest.java
index 61f21529547..02ec903e2ce 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/batch/scan/measure/MeasureCacheTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/batch/scan/measure/MeasureCacheTest.java
@@ -53,7 +53,7 @@ public class MeasureCacheTest extends AbstractCachesTest {
public void start() {
super.start();
metricFinder = mock(MetricFinder.class);
- when(metricFinder.findByKey(CoreMetrics.NCLOC_KEY)).thenReturn(CoreMetrics.NCLOC);
+ when(metricFinder.<Integer>findByKey(CoreMetrics.NCLOC_KEY)).thenReturn(CoreMetrics.NCLOC);
measureCache = new MeasureCache(caches, metricFinder);
}
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/batch/sensor/DefaultSensorContextTest.java b/sonar-scanner-engine/src/test/java/org/sonar/batch/sensor/DefaultSensorContextTest.java
index 913a5fa67bc..cd32cbfeae3 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/batch/sensor/DefaultSensorContextTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/batch/sensor/DefaultSensorContextTest.java
@@ -61,8 +61,8 @@ public class DefaultSensorContextTest {
activeRules = new ActiveRulesBuilder().build();
fs = new DefaultFileSystem(temp.newFolder().toPath());
MetricFinder metricFinder = mock(MetricFinder.class);
- when(metricFinder.findByKey(CoreMetrics.NCLOC_KEY)).thenReturn(CoreMetrics.NCLOC);
- when(metricFinder.findByKey(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION_KEY)).thenReturn(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION);
+ when(metricFinder.<Integer>findByKey(CoreMetrics.NCLOC_KEY)).thenReturn(CoreMetrics.NCLOC);
+ when(metricFinder.<String>findByKey(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION_KEY)).thenReturn(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION);
settings = new Settings();
sensorStorage = mock(SensorStorage.class);
analysisMode = mock(AnalysisMode.class);
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/batch/sensor/DefaultSensorStorageTest.java b/sonar-scanner-engine/src/test/java/org/sonar/batch/sensor/DefaultSensorStorageTest.java
index caa16b11a19..a1c406e2adc 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/batch/sensor/DefaultSensorStorageTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/batch/sensor/DefaultSensorStorageTest.java
@@ -75,8 +75,8 @@ public class DefaultSensorStorageTest {
activeRules = new ActiveRulesBuilder().build();
fs = new DefaultFileSystem(temp.newFolder().toPath());
MetricFinder metricFinder = mock(MetricFinder.class);
- when(metricFinder.findByKey(CoreMetrics.NCLOC_KEY)).thenReturn(CoreMetrics.NCLOC);
- when(metricFinder.findByKey(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION_KEY)).thenReturn(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION);
+ when(metricFinder.<Integer>findByKey(CoreMetrics.NCLOC_KEY)).thenReturn(CoreMetrics.NCLOC);
+ when(metricFinder.<String>findByKey(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION_KEY)).thenReturn(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION);
settings = new Settings();
moduleIssues = mock(ModuleIssues.class);
project = new Project("myProject");