aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/test/java
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-12-10 13:37:09 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-12-10 13:37:09 +0000
commitfe0b0a7a4ba6ecca89ee70452f22d9e9dcc1e924 (patch)
tree3eb400acc77b5173120a89acf28266c2f15ac038 /sonar-server/src/test/java
parenta55b6d2875e0386cef1c95b6e638c8dd5d9939d0 (diff)
downloadsonarqube-fe0b0a7a4ba6ecca89ee70452f22d9e9dcc1e924.tar.gz
sonarqube-fe0b0a7a4ba6ecca89ee70452f22d9e9dcc1e924.zip
SONAR-1956 improve filters in order to display variations
Diffstat (limited to 'sonar-server/src/test/java')
-rw-r--r--sonar-server/src/test/java/org/sonar/server/filters/FilterExecutorTest.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/sonar-server/src/test/java/org/sonar/server/filters/FilterExecutorTest.java b/sonar-server/src/test/java/org/sonar/server/filters/FilterExecutorTest.java
index 72e2f1ca4e4..627561b4f4f 100644
--- a/sonar-server/src/test/java/org/sonar/server/filters/FilterExecutorTest.java
+++ b/sonar-server/src/test/java/org/sonar/server/filters/FilterExecutorTest.java
@@ -155,7 +155,7 @@ public class FilterExecutorTest extends AbstractDbUnitTestCase {
FilterExecutor executor = new FilterExecutor(getSession());
Filter filter = new Filter()
.setQualifiers(Sets.newHashSet(Resource.QUALIFIER_CLASS))
- .addMeasureCriterion(new MeasureCriterion(2, ">", 50.0));
+ .addMeasureCriterion(new MeasureCriterion(2, ">", 50.0, false));
FilterResult result = executor.execute(filter);
assertSnapshotIds(result, 5);
@@ -167,8 +167,8 @@ public class FilterExecutorTest extends AbstractDbUnitTestCase {
FilterExecutor executor = new FilterExecutor(getSession());
Filter filter = new Filter()
.setQualifiers(Sets.newHashSet(Resource.QUALIFIER_CLASS))
- .addMeasureCriterion(new MeasureCriterion(2, ">", 50.0))
- .addMeasureCriterion(new MeasureCriterion(1, ">", 100.0));
+ .addMeasureCriterion(new MeasureCriterion(2, ">", 50.0, false))
+ .addMeasureCriterion(new MeasureCriterion(1, ">", 100.0, false));
FilterResult result = executor.execute(filter);
assertSnapshotIds(result, 5);
@@ -180,8 +180,8 @@ public class FilterExecutorTest extends AbstractDbUnitTestCase {
FilterExecutor executor = new FilterExecutor(getSession());
Filter filter = new Filter()
.setQualifiers(Sets.newHashSet(Resource.QUALIFIER_CLASS))
- .addMeasureCriterion(new MeasureCriterion(2, ">", 50.0))
- .addMeasureCriterion(new MeasureCriterion(1, "<", 100.0));
+ .addMeasureCriterion(new MeasureCriterion(2, ">", 50.0, false))
+ .addMeasureCriterion(new MeasureCriterion(1, "<", 100.0, false));
FilterResult result = executor.execute(filter);
assertThat(result.size(), is(0));
@@ -193,8 +193,8 @@ public class FilterExecutorTest extends AbstractDbUnitTestCase {
FilterExecutor executor = new FilterExecutor(getSession());
Filter filter = new Filter()
.setQualifiers(Sets.newHashSet(Resource.QUALIFIER_CLASS))
- .addMeasureCriterion(new MeasureCriterion(2, ">", 5.0))
- .addMeasureCriterion(new MeasureCriterion(1, ">", 5.0))
+ .addMeasureCriterion(new MeasureCriterion(2, ">", 5.0, false))
+ .addMeasureCriterion(new MeasureCriterion(1, ">", 5.0, false))
.setSortedMetricId(2); // sort by coverage
FilterResult result = executor.execute(filter);
@@ -207,8 +207,8 @@ public class FilterExecutorTest extends AbstractDbUnitTestCase {
FilterExecutor executor = new FilterExecutor(getSession());
Filter filter = new Filter()
.setQualifiers(Sets.newHashSet(Resource.QUALIFIER_CLASS))
- .addMeasureCriterion(new MeasureCriterion(2, ">", 5.0)) // filter on coverage
- .addMeasureCriterion(new MeasureCriterion(1, ">", 5.0)) // filter on lines
+ .addMeasureCriterion(new MeasureCriterion(2, ">", 5.0, false)) // filter on coverage
+ .addMeasureCriterion(new MeasureCriterion(1, ">", 5.0, false)) // filter on lines
.setSortedMetricId(2) // sort by coverage
.setAscendingSort(false);
@@ -238,7 +238,7 @@ public class FilterExecutorTest extends AbstractDbUnitTestCase {
FilterExecutor executor = new FilterExecutor(getSession());
Filter filter = new Filter()
.setQualifiers(Sets.newHashSet(Resource.QUALIFIER_CLASS))
- .addMeasureCriterion(new MeasureCriterion(3, ">", 0.0)); // filter on duplicated lines
+ .addMeasureCriterion(new MeasureCriterion(3, ">", 0.0, false)); // filter on duplicated lines
FilterResult result = executor.execute(filter);
assertSnapshotIds(result, 6);
@@ -250,8 +250,8 @@ public class FilterExecutorTest extends AbstractDbUnitTestCase {
FilterExecutor executor = new FilterExecutor(getSession());
Filter filter = new Filter()
.setQualifiers(Sets.newHashSet(Resource.QUALIFIER_CLASS))
- .addMeasureCriterion(new MeasureCriterion(1, ">", 0.0)) // filter on lines
- .addMeasureCriterion(new MeasureCriterion(3, ">", 0.0)); // filter on duplicated lines
+ .addMeasureCriterion(new MeasureCriterion(1, ">", 0.0, false)) // filter on lines
+ .addMeasureCriterion(new MeasureCriterion(3, ">", 0.0, false)); // filter on duplicated lines
FilterResult result = executor.execute(filter);
assertSnapshotIds(result, 6);
@@ -275,7 +275,7 @@ public class FilterExecutorTest extends AbstractDbUnitTestCase {
FilterExecutor executor = new FilterExecutor(getSession());
Filter filter = new Filter()
.setQualifiers(Sets.newHashSet(Resource.QUALIFIER_CLASS))
- .addMeasureCriterion(new MeasureCriterion(1, ">", 0.0)) // lines > 0
+ .addMeasureCriterion(new MeasureCriterion(1, ">", 0.0, false)) // lines > 0
.setSortedMetricId(2); // sort by coverage
FilterResult result = executor.execute(filter);
@@ -288,8 +288,8 @@ public class FilterExecutorTest extends AbstractDbUnitTestCase {
FilterExecutor executor = new FilterExecutor(getSession());
Filter filter = new Filter()
.setQualifiers(Sets.newHashSet(Resource.QUALIFIER_CLASS))
- .addMeasureCriterion(new MeasureCriterion(1, ">", 400.0)) // lines > 400
- .addMeasureCriterion(new MeasureCriterion(1, "<", 600.0)); // lines > 400
+ .addMeasureCriterion(new MeasureCriterion(1, ">", 400.0, false)) // lines > 400
+ .addMeasureCriterion(new MeasureCriterion(1, "<", 600.0, false)); // lines > 400
FilterResult result = executor.execute(filter);
assertSnapshotIds(result, 5);