From fd2f62993d4fae153f792ad545379612a3a2755e Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 23 Feb 2015 18:04:58 +0100 Subject: SONAR-5936 improve Elasticsearch information displayed in System Info --- .../src/test/java/org/sonar/api/utils/text/JsonWriterTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sonar-plugin-api/src/test') diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java index 80c7fc65a2b..45280508abb 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java @@ -130,9 +130,10 @@ public class JsonWriterTest { .name("aFloat").valueObject(3.14) .name("aLong").valueObject(42L) .name("aList").valueObject(Arrays.asList("one", 2, "three")) + .name("anEnum").valueObject(ColorEnum.GREEN) .name("aMap").valueObject(ImmutableMap.of("hello", "world", "good", "bye")) .endObject().close(); - expect("{\"aString\":\"stringValue\",\"aBoolean\":true,\"aInt\":42,\"aFloat\":3.14,\"aLong\":42,\"aList\":[\"one\",2,\"three\"],\"aMap\":{\"hello\":\"world\",\"good\":\"bye\"}}"); + expect("{\"aString\":\"stringValue\",\"aBoolean\":true,\"aInt\":42,\"aFloat\":3.14,\"aLong\":42,\"aList\":[\"one\",2,\"three\"],\"anEnum\":\"GREEN\",\"aMap\":{\"hello\":\"world\",\"good\":\"bye\"}}"); } @Test @@ -173,4 +174,8 @@ public class JsonWriterTest { new JsonWriter(gson).beginArray(); } + + private static enum ColorEnum { + RED, GREEN + } } -- cgit v1.2.3