Add test
This commit is contained in:
parent
0d8c42ee1a
commit
e439891ea2
|
@ -46,6 +46,22 @@ public class TolerantJsonParserR4Test {
|
|||
assertEquals("0.5", obs.getValueQuantity().getValueElement().getValueAsString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParseInvalidNumeric_DoubleZeros() {
|
||||
String input = "{\n" +
|
||||
"\"resourceType\": \"Observation\",\n" +
|
||||
"\"valueQuantity\": {\n" +
|
||||
" \"value\": 00\n" +
|
||||
" }\n" +
|
||||
"}";
|
||||
|
||||
|
||||
TolerantJsonParser parser = new TolerantJsonParser(myFhirContext, new LenientErrorHandler());
|
||||
Observation obs = parser.parseResource(Observation.class, input);
|
||||
|
||||
assertEquals("0", obs.getValueQuantity().getValueElement().getValueAsString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParseInvalidNumeric2() {
|
||||
String input = "{\n" +
|
||||
|
|
|
@ -168,4 +168,4 @@ public class ApacheProxyAddressStrategy extends IncomingRequestAddressStrategy {
|
|||
public static ApacheProxyAddressStrategy forHttps() {
|
||||
return new ApacheProxyAddressStrategy(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue