aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-02-23 00:41:42 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-02-23 00:41:42 +0100
commite0a45822f9a18b4b1d0d22f53b2218cd60795f6f (patch)
tree69ad0eb029b46fb0a0abbc8cfed2c79ea6816294 /sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java
parentc4e7fb294ca6b445db2a59336913642dd7273f2b (diff)
downloadsonarqube-e0a45822f9a18b4b1d0d22f53b2218cd60795f6f.tar.gz
sonarqube-e0a45822f9a18b4b1d0d22f53b2218cd60795f6f.zip
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java
index 7a4e3468362..6217e6d4f1b 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/ValidationMessagesTest.java
@@ -40,6 +40,12 @@ public class ValidationMessagesTest {
verify(logger, never()).error(anyString());
verify(logger, never()).warn(anyString());
verify(logger, never()).info(anyString());
+
+ org.slf4j.Logger slf4j = mock(org.slf4j.Logger.class);
+ messages.log(slf4j);
+ verify(slf4j, never()).error(anyString());
+ verify(slf4j, never()).warn(anyString());
+ verify(slf4j, never()).info(anyString());
}
@Test
@@ -58,5 +64,11 @@ public class ValidationMessagesTest {
verify(logger, times(1)).error("my error");
verify(logger, never()).warn(anyString());
verify(logger, never()).info(anyString());
+
+ org.slf4j.Logger slf4j = mock(org.slf4j.Logger.class);
+ messages.log(slf4j);
+ verify(slf4j, times(1)).error("my error");
+ verify(slf4j, never()).warn(anyString());
+ verify(slf4j, never()).info(anyString());
}
}