aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-06-18 12:51:59 +0200
committerDavid Gageot <david@gageot.net>2012-06-18 12:53:35 +0200
commitf6bd1081bf27f5c5590112fe9131dc5e24670b4d (patch)
treed322ce9768d7036279c812c198b0d9d38ba8bd77 /plugins
parentba7439977f53e5c05f2c6cd52b907f6582a10bde (diff)
downloadsonarqube-f6bd1081bf27f5c5590112fe9131dc5e24670b4d.tar.gz
sonarqube-f6bd1081bf27f5c5590112fe9131dc5e24670b4d.zip
Remove warnings
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProfileEventsSensorTest.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProfileEventsSensorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProfileEventsSensorTest.java
index f2b885fb65d..8ce2c25ebf8 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProfileEventsSensorTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ProfileEventsSensorTest.java
@@ -79,7 +79,7 @@ public class ProfileEventsSensorTest {
@Test
public void shouldDoNothingIfNoProfileChange() {
RulesProfile profile = mockProfileWithVersion(1);
- TimeMachine timeMachine = mockTM(project, 22.0, "Foo", 1.0); // Same profile, same version
+ TimeMachine timeMachine = mockTM(22.0, "Foo", 1.0); // Same profile, same version
ProfileEventsSensor sensor = new ProfileEventsSensor(profile, timeMachine);
sensor.analyse(project, context);
@@ -90,7 +90,7 @@ public class ProfileEventsSensorTest {
@Test
public void shouldCreateEventIfProfileChange() {
RulesProfile profile = mockProfileWithVersion(1);
- TimeMachine timeMachine = mockTM(project, 21.0, "Bar", 1.0); // Different profile
+ TimeMachine timeMachine = mockTM(21.0, "Bar", 1.0); // Different profile
ProfileEventsSensor sensor = new ProfileEventsSensor(profile, timeMachine);
sensor.analyse(project, context);
@@ -104,7 +104,7 @@ public class ProfileEventsSensorTest {
@Test
public void shouldCreateEventIfProfileVersionChange() {
RulesProfile profile = mockProfileWithVersion(2);
- TimeMachine timeMachine = mockTM(project, 22.0, "Foo", 1.0); // Same profile, different version
+ TimeMachine timeMachine = mockTM(22.0, "Foo", 1.0); // Same profile, different version
ProfileEventsSensor sensor = new ProfileEventsSensor(profile, timeMachine);
sensor.analyse(project, context);
@@ -118,7 +118,7 @@ public class ProfileEventsSensorTest {
@Test
public void shouldNotCreateEventIfFirstAnalysis() {
RulesProfile profile = mockProfileWithVersion(2);
- TimeMachine timeMachine = mockTM(project, null, null);
+ TimeMachine timeMachine = mockTM(null, null);
ProfileEventsSensor sensor = new ProfileEventsSensor(profile, timeMachine);
sensor.analyse(project, context);
@@ -129,7 +129,7 @@ public class ProfileEventsSensorTest {
@Test
public void shouldCreateEventIfFirstAnalysisWithVersionsAndVersionMoreThan1() {
RulesProfile profile = mockProfileWithVersion(2);
- TimeMachine timeMachine = mockTM(project, 22.0, "Foo", null);
+ TimeMachine timeMachine = mockTM(22.0, "Foo", null);
ProfileEventsSensor sensor = new ProfileEventsSensor(profile, timeMachine);
sensor.analyse(project, context);
@@ -148,11 +148,11 @@ public class ProfileEventsSensorTest {
return profile;
}
- private TimeMachine mockTM(Project project, double profileId, String profileName, Double versionValue) {
- return mockTM(project, new Measure(CoreMetrics.PROFILE, profileId, profileName), versionValue == null ? null : new Measure(CoreMetrics.PROFILE_VERSION, versionValue));
+ private TimeMachine mockTM(double profileId, String profileName, Double versionValue) {
+ return mockTM(new Measure(CoreMetrics.PROFILE, profileId, profileName), versionValue == null ? null : new Measure(CoreMetrics.PROFILE_VERSION, versionValue));
}
- private TimeMachine mockTM(Project project, Measure result1, Measure result2) {
+ private TimeMachine mockTM(Measure result1, Measure result2) {
TimeMachine timeMachine = mock(TimeMachine.class);
when(timeMachine.getMeasures(any(TimeMachineQuery.class)))
@@ -161,5 +161,4 @@ public class ProfileEventsSensorTest {
return timeMachine;
}
-
}