aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-duplications
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2015-07-07 10:45:43 +0200
committerDavid Gageot <david@gageot.net>2015-07-07 11:36:26 +0200
commit38df1425f5f4e967ac7f27367599c852a52b8b7c (patch)
tree3faba18cb31f6b9c77c356be775cdb10e44a6a6b /sonar-duplications
parenta6f8589f7015886ba1a325ce6955d27d65da07cf (diff)
downloadsonarqube-38df1425f5f4e967ac7f27367599c852a52b8b7c.tar.gz
sonarqube-38df1425f5f4e967ac7f27367599c852a52b8b7c.zip
Fix deprecated code
Diffstat (limited to 'sonar-duplications')
-rw-r--r--sonar-duplications/src/test/java/org/sonar/duplications/detector/DetectorTestCase.java2
-rw-r--r--sonar-duplications/src/test/java/org/sonar/duplications/junit/TestNamePrinter.java10
2 files changed, 6 insertions, 6 deletions
diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/detector/DetectorTestCase.java b/sonar-duplications/src/test/java/org/sonar/duplications/detector/DetectorTestCase.java
index 100b09d1be8..261eacfe314 100644
--- a/sonar-duplications/src/test/java/org/sonar/duplications/detector/DetectorTestCase.java
+++ b/sonar-duplications/src/test/java/org/sonar/duplications/detector/DetectorTestCase.java
@@ -34,11 +34,11 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.sameInstance;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
-import static org.junit.matchers.JUnitMatchers.hasItem;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/junit/TestNamePrinter.java b/sonar-duplications/src/test/java/org/sonar/duplications/junit/TestNamePrinter.java
index 8064c822f34..4bca9becb43 100644
--- a/sonar-duplications/src/test/java/org/sonar/duplications/junit/TestNamePrinter.java
+++ b/sonar-duplications/src/test/java/org/sonar/duplications/junit/TestNamePrinter.java
@@ -19,14 +19,14 @@
*/
package org.sonar.duplications.junit;
-import org.junit.rules.TestWatchman;
-import org.junit.runners.model.FrameworkMethod;
+import org.junit.rules.TestWatcher;
+import org.junit.runner.Description;
-public class TestNamePrinter extends TestWatchman {
+public class TestNamePrinter extends TestWatcher {
@Override
- public void starting(FrameworkMethod method) {
- System.out.println("Executing " + method.getName());
+ protected void starting(Description description) {
+ System.out.println("Executing " + description.getMethodName());
}
}