diff options
author | Godin <mandrikov@gmail.com> | 2010-11-26 15:50:49 +0000 |
---|---|---|
committer | Godin <mandrikov@gmail.com> | 2010-11-26 15:50:49 +0000 |
commit | ee7713a87f26b26070f2fb605850d8d0c620489e (patch) | |
tree | 084e8e0a040e90b1f19935c7f0a5b0aedf2647b5 /plugins/sonar-squid-java-plugin | |
parent | 6d6a15f11a58b03d3942cd9e237460cdc2393ed2 (diff) | |
download | sonarqube-ee7713a87f26b26070f2fb605850d8d0c620489e.tar.gz sonarqube-ee7713a87f26b26070f2fb605850d8d0c620489e.zip |
SONAR-1930, SONAR-1845, SONAR-1931: Improve unit tests
Diffstat (limited to 'plugins/sonar-squid-java-plugin')
3 files changed, 3 insertions, 0 deletions
diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/ClassComplexityCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/ClassComplexityCheckTest.java index b1c00950233..c82817d1cb6 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/ClassComplexityCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/ClassComplexityCheckTest.java @@ -57,6 +57,7 @@ public class ClassComplexityCheckTest { assertThat(file.getCheckMessages().size(), is(1)); CheckMessage message = file.getCheckMessages().iterator().next(); assertThat(message.getLine(), is(3)); + assertThat(message.getCost(), is(3.0)); } @Test diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/DITCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/DITCheckTest.java index 3759f4a45e8..466e3ad49b9 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/DITCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/DITCheckTest.java @@ -55,6 +55,7 @@ public class DITCheckTest { assertThat(file.getCheckMessages().size(), is(1)); CheckMessage message = file.getCheckMessages().iterator().next(); assertThat(message.getLine(), is(7)); + assertThat(message.getCost(), is(1.0)); } @Test diff --git a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/MethodComplexityCheckTest.java b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/MethodComplexityCheckTest.java index 27d96fdf185..e7567d12250 100644 --- a/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/MethodComplexityCheckTest.java +++ b/plugins/sonar-squid-java-plugin/src/test/java/org/sonar/java/squid/check/MethodComplexityCheckTest.java @@ -55,5 +55,6 @@ public class MethodComplexityCheckTest { assertThat(file.getCheckMessages().size(), is(1)); CheckMessage message = file.getCheckMessages().iterator().next(); assertThat(message.getLine(), is(10)); + assertThat(message.getCost(), is(2.0)); } } |