diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-09-16 16:35:44 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-09-30 16:27:12 +0200 |
commit | 1dae583a5cca52b34f6a11ed6cf515998ca06d4b (patch) | |
tree | 9dd8b29ecc140bb9702c6c0fa8e9312ff9d0a9a8 /sonar-batch/src/test/java | |
parent | dab419c5e535a5e0c4c698490f140cbd770ce90f (diff) | |
download | sonarqube-1dae583a5cca52b34f6a11ed6cf515998ca06d4b.tar.gz sonarqube-1dae583a5cca52b34f6a11ed6cf515998ca06d4b.zip |
Improve logging of PostJob and Sensor objects
Diffstat (limited to 'sonar-batch/src/test/java')
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/util/BatchUtilsTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/util/BatchUtilsTest.java b/sonar-batch/src/test/java/org/sonar/batch/util/BatchUtilsTest.java index 7926172f078..dfe663d016c 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/util/BatchUtilsTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/util/BatchUtilsTest.java @@ -32,4 +32,20 @@ public class BatchUtilsTest { assertThat(BatchUtils.encodeForUrl("foo")).isEqualTo("foo"); assertThat(BatchUtils.encodeForUrl("foo&bar")).isEqualTo("foo%26bar"); } + + @Test + + public void testDescribe() { + Object withToString = new Object() { + @Override + public String toString() { + return "desc"; + } + }; + + Object withoutToString = new Object(); + + assertThat(BatchUtils.describe(withToString)).isEqualTo(("desc")); + assertThat(BatchUtils.describe(withoutToString)).isEqualTo("java.lang.Object"); + } } |