diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-11-08 14:16:59 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2016-11-08 14:17:07 +0100 |
commit | 90b80bd13929daf105060524bd5170b1b0d30e96 (patch) | |
tree | ff0072639516396a258f97f387e2ef9154ab2253 /sonar-db | |
parent | 8916c91390f09ea766ce0668d1795aa8e67cf5c2 (diff) | |
download | sonarqube-90b80bd13929daf105060524bd5170b1b0d30e96.tar.gz sonarqube-90b80bd13929daf105060524bd5170b1b0d30e96.zip |
Fix quality flaws
Diffstat (limited to 'sonar-db')
-rw-r--r-- | sonar-db/src/test/java/org/sonar/db/metric/MetricDtoTest.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sonar-db/src/test/java/org/sonar/db/metric/MetricDtoTest.java b/sonar-db/src/test/java/org/sonar/db/metric/MetricDtoTest.java index afd291e9ba6..f4cdcc235ec 100644 --- a/sonar-db/src/test/java/org/sonar/db/metric/MetricDtoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/metric/MetricDtoTest.java @@ -22,6 +22,9 @@ package org.sonar.db.metric; import org.junit.Test; import static org.assertj.core.api.Assertions.assertThat; +import static org.sonar.api.measures.Metric.ValueType.DATA; +import static org.sonar.api.measures.Metric.ValueType.INT; +import static org.sonar.api.measures.Metric.ValueType.STRING; public class MetricDtoTest { @@ -60,4 +63,13 @@ public class MetricDtoTest { assertThat(metricDto.isDeleteHistoricalData()).isTrue(); assertThat(metricDto.isEnabled()).isTrue(); } + + @Test + public void is_data_type() throws Exception { + assertThat(MetricTesting.newMetricDto().setValueType(INT.name()).isDataType()).isFalse(); + + assertThat(MetricTesting.newMetricDto().setValueType(DATA.name()).isDataType()).isTrue(); + assertThat(MetricTesting.newMetricDto().setValueType(STRING.name()).isDataType()).isTrue(); + assertThat(MetricTesting.newMetricDto().setValueType(STRING.name()).isDataType()).isTrue(); + } } |