aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-xoo-plugin
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 /plugins/sonar-xoo-plugin
parent4c56e6c287c0ca07dba287a234759c5a32193ba7 (diff)
downloadsonarqube-d8845c6f438cee268fa4268a6a6503c54330bdda.tar.gz
sonarqube-d8845c6f438cee268fa4268a6a6503c54330bdda.zip
SONAR-7636 Deprecate org.sonar.api.measures.Measure + many small API improvements
Diffstat (limited to 'plugins/sonar-xoo-plugin')
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java
index 2b384b02747..7ce2dc972ff 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/MeasureSensorTest.java
@@ -19,6 +19,8 @@
*/
package org.sonar.xoo.lang;
+import java.io.File;
+import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.junit.Before;
import org.junit.Rule;
@@ -32,9 +34,6 @@ import org.sonar.api.batch.sensor.internal.SensorContextTester;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.Metric;
-import java.io.File;
-import java.io.IOException;
-
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -83,10 +82,10 @@ public class MeasureSensorTest {
Metric<Boolean> booleanMetric = new Metric.Builder("bool", "Bool", Metric.ValueType.BOOL)
.create();
- when(metricFinder.findByKey("ncloc")).thenReturn(CoreMetrics.NCLOC);
- when(metricFinder.findByKey("branch_coverage")).thenReturn(CoreMetrics.BRANCH_COVERAGE);
- when(metricFinder.findByKey("sqale_index")).thenReturn(CoreMetrics.TECHNICAL_DEBT);
- when(metricFinder.findByKey("bool")).thenReturn(booleanMetric);
+ when(metricFinder.<Integer>findByKey("ncloc")).thenReturn(CoreMetrics.NCLOC);
+ when(metricFinder.<Double>findByKey("branch_coverage")).thenReturn(CoreMetrics.BRANCH_COVERAGE);
+ when(metricFinder.<Long>findByKey("sqale_index")).thenReturn(CoreMetrics.TECHNICAL_DEBT);
+ when(metricFinder.<Boolean>findByKey("bool")).thenReturn(booleanMetric);
sensor.execute(context);