[(master)] Fixed faulty test
This commit is contained in:
parent
ee3d540607
commit
f0477ac807
|
@ -721,7 +721,7 @@ public class JsonParser extends BaseParser implements IJsonLikeParser {
|
|||
}
|
||||
|
||||
writeMetadataExtensions(extensionKeys, "extension", theEventWriter);
|
||||
writeMetadataExtensions(extensionKeys, "modifierExtension", theEventWriter);
|
||||
writeMetadataExtensions(modifierExtensionKeys, "modifierExtension", theEventWriter);
|
||||
}
|
||||
|
||||
private void writeMetadataExtensions(List<Map.Entry<ResourceMetadataKeyEnum<?>, Object>> extensions, String arrayName, JsonLikeWriter theEventWriter) throws IOException {
|
||||
|
|
|
@ -1719,29 +1719,25 @@ public class JsonParserDstu2Test {
|
|||
addExtensionResourceMetadataKeyToResource(procedureRequest, true, "http://someurl.com/modifier", "SomeValue");
|
||||
addExtensionResourceMetadataKeyToResource(procedureRequest, true, "http://someurl.com/modifier2", "SomeValue2");
|
||||
|
||||
String json = ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(procedureRequest);
|
||||
String json = ourCtx.newJsonParser().encodeResourceToString(procedureRequest);
|
||||
|
||||
// @formatter:off
|
||||
assertThat(json, stringContainsInOrder("\"meta\": {",
|
||||
"\"extension\": [", "{",
|
||||
assertThat(json, stringContainsInOrder(
|
||||
"\"meta\":{",
|
||||
"\"extension\":[{",
|
||||
"\"url\":\"http://someurl.com\",",
|
||||
"\"valueString\":\"SomeValue\"",
|
||||
"},",
|
||||
"{",
|
||||
"},{",
|
||||
"\"url\":\"http://someurl2.com\",",
|
||||
"\"valueString\":\"SomeValue2\"",
|
||||
"}",
|
||||
"],",
|
||||
"\"modifierExtension\": [",
|
||||
"{",
|
||||
"\"url\": \"http://someurl.com\",",
|
||||
"}],",
|
||||
"\"modifierExtension\":[{",
|
||||
"\"url\":\"http://someurl.com/modifier\",",
|
||||
"\"valueString\":\"SomeValue\"",
|
||||
"},",
|
||||
"{",
|
||||
"\"url\": \"http://someurl2.com\",",
|
||||
"},{",
|
||||
"\"url\":\"http://someurl.com/modifier2\",",
|
||||
"\"valueString\":\"SomeValue2\"",
|
||||
"}",
|
||||
"]"));
|
||||
"}]"));
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue