Fix /configprops tests

pull/1958/head
Dave Syer 10 years ago
parent 6ad626de49
commit 0757d24d91

@ -166,7 +166,7 @@ public class ConfigurationPropertiesReportEndpointSerializationTests {
Map<String, Object> map = (Map<String, Object>) nestedProperties Map<String, Object> map = (Map<String, Object>) nestedProperties
.get("properties"); .get("properties");
assertNotNull(map); assertNotNull(map);
assertEquals(2, map.size()); assertEquals(3, map.size());
assertEquals(null, (map.get("map"))); assertEquals(null, (map.get("map")));
} }
@ -206,7 +206,8 @@ public class ConfigurationPropertiesReportEndpointSerializationTests {
Map<String, Object> map = (Map<String, Object>) nestedProperties Map<String, Object> map = (Map<String, Object>) nestedProperties
.get("properties"); .get("properties");
assertNotNull(map); assertNotNull(map);
assertEquals(2, map.size()); // Only one property is mapped in metadata so the others are ignored
assertEquals(1, map.size());
assertEquals("foo", ((Map<String, Object>) map.get("map")).get("name")); assertEquals("foo", ((Map<String, Object>) map.get("map")).get("name"));
} }

@ -1,10 +1,12 @@
{"properties": [ {"properties": [
{ {
"name": "bar.name", "name": "bar.name",
"type": "java.util.Map",
"dataType": "java.lang.String" "dataType": "java.lang.String"
}, },
{ {
"name": "spam.map.name", "name": "spam.map.name",
"type": "java.util.Map",
"dataType": "java.lang.String" "dataType": "java.lang.String"
} ]} } ]}

Loading…
Cancel
Save