diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2012-02-03 16:14:58 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2012-02-04 01:58:31 +0400 |
commit | 480b51e830ad9f64a363b86bbf183879a5a76728 (patch) | |
tree | afe8ab464c42aac71f8d25d8b46db05c32458ee7 /plugins/sonar-cpd-plugin | |
parent | ee368b839c08103857e0791c8957f9179e40f058 (diff) | |
download | sonarqube-480b51e830ad9f64a363b86bbf183879a5a76728.tar.gz sonarqube-480b51e830ad9f64a363b86bbf183879a5a76728.zip |
Fix some quality flaws
Diffstat (limited to 'plugins/sonar-cpd-plugin')
-rw-r--r-- | plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java index 2b6c2b39a4e..434049fdbd6 100644 --- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java +++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java @@ -19,16 +19,6 @@ */ package org.sonar.plugins.cpd; -import static org.mockito.Matchers.argThat; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - import org.junit.Before; import org.junit.Test; import org.sonar.api.batch.SensorContext; @@ -39,6 +29,14 @@ import org.sonar.api.test.IsMeasure; import org.sonar.duplications.index.CloneGroup; import org.sonar.duplications.index.ClonePart; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import static org.mockito.Matchers.argThat; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.*; + public class SonarEngineTest { private SensorContext context; @@ -132,7 +130,7 @@ public class SonarEngineTest { } private CloneGroup newCloneGroup(ClonePart... parts) { - return new CloneGroup(0, parts[0], Arrays.asList(parts)); + return CloneGroup.builder().setLength(0).setOrigin(parts[0]).setParts(Arrays.asList(parts)).build(); } } |