aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-01-15 16:37:28 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2013-01-15 16:37:28 +0100
commit23afb6181f677e423e2c7852f6578a3a25ee1493 (patch)
tree9c635cefd6886f6304284cb19514e773793c3907 /src
parentb96791e9633ab77124cef3b87c9b1375cdcd47e8 (diff)
downloadsonar-scanner-cli-23afb6181f677e423e2c7852f6578a3a25ee1493.tar.gz
sonar-scanner-cli-23afb6181f677e423e2c7852f6578a3a25ee1493.zip
SONARPLUGINS-2540 Fix JUnit test after updating version check
Diffstat (limited to 'src')
-rw-r--r--src/test/java/org/sonar/runner/RunnerTest.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/test/java/org/sonar/runner/RunnerTest.java b/src/test/java/org/sonar/runner/RunnerTest.java
index d69cef8..2752999 100644
--- a/src/test/java/org/sonar/runner/RunnerTest.java
+++ b/src/test/java/org/sonar/runner/RunnerTest.java
@@ -80,8 +80,13 @@ public class RunnerTest {
assertThat(Runner.isUnsupportedVersion("2.4")).isTrue();
assertThat(Runner.isUnsupportedVersion("2.4.1")).isTrue();
assertThat(Runner.isUnsupportedVersion("2.5")).isTrue();
- assertThat(Runner.isUnsupportedVersion("2.11")).isFalse();
- assertThat(Runner.isUnsupportedVersion("3.0")).isFalse();
+ assertThat(Runner.isUnsupportedVersion("2.11")).isTrue();
+ assertThat(Runner.isUnsupportedVersion("3.0")).isTrue();
+ assertThat(Runner.isUnsupportedVersion("3.1")).isTrue();
+ assertThat(Runner.isUnsupportedVersion("3.2")).isTrue();
+ assertThat(Runner.isUnsupportedVersion("3.3")).isTrue();
+ assertThat(Runner.isUnsupportedVersion("3.4")).isTrue();
+ assertThat(Runner.isUnsupportedVersion("3.5")).isFalse();
}
@Test
@@ -171,13 +176,13 @@ public class RunnerTest {
Bootstrapper bootstrapper = mock(Bootstrapper.class);
// nothing happens, OK
- when(bootstrapper.getServerVersion()).thenReturn("3.1");
+ when(bootstrapper.getServerVersion()).thenReturn("3.5");
runner.checkSonarVersion(bootstrapper);
// but fails with older versions
when(bootstrapper.getServerVersion()).thenReturn("2.1");
thrown.expect(RunnerException.class);
- thrown.expectMessage("Sonar 2.1 is not supported. Please upgrade Sonar to version 2.11 or more.");
+ thrown.expectMessage("Sonar 2.1 is not supported. Please upgrade Sonar to version 3.5 or more.");
runner.checkSonarVersion(bootstrapper);
}