aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-06-15 13:05:27 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-06-19 15:42:25 +0200
commit92daf6f5ba18e088678729bff0b32e93d8f438f0 (patch)
tree1adaf41c565ecc16dd8570383a9be152bbcc90a8 /sonar-batch
parent51f9e345101fc78a78168e98fdebc61d0575ac57 (diff)
downloadsonarqube-92daf6f5ba18e088678729bff0b32e93d8f438f0.tar.gz
sonarqube-92daf6f5ba18e088678729bff0b32e93d8f438f0.zip
add missing unit test for LT and GT operators when value is equal
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java b/sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java
index 1ea0ce1c220..adaed453f51 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/qualitygate/ConditionUtilsTest.java
@@ -141,6 +141,9 @@ public class ConditionUtilsTest {
when(condition.errorThreshold()).thenReturn("10.1");
assertThat(ConditionUtils.getLevel(condition, measure)).isEqualTo(Metric.Level.ERROR);
+ when(condition.errorThreshold()).thenReturn("10.2");
+ assertThat(ConditionUtils.getLevel(condition, measure)).isEqualTo(Metric.Level.OK);
+
when(condition.errorThreshold()).thenReturn("10.3");
assertThat(ConditionUtils.getLevel(condition, measure)).isEqualTo(Metric.Level.OK);
}
@@ -155,6 +158,9 @@ public class ConditionUtilsTest {
when(condition.errorThreshold()).thenReturn("10.1");
assertThat(ConditionUtils.getLevel(condition, measure)).isEqualTo(Metric.Level.OK);
+ when(condition.errorThreshold()).thenReturn("10.2");
+ assertThat(ConditionUtils.getLevel(condition, measure)).isEqualTo(Metric.Level.OK);
+
when(condition.errorThreshold()).thenReturn("10.3");
assertThat(ConditionUtils.getLevel(condition, measure)).isEqualTo(Metric.Level.ERROR);
}