Add ignored test for
@@ -66,10 +66,13 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.*;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.Mockito.*;
+import static org.mockito.ArgumentMatchers.nullable;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
public class FhirInstanceValidatorR4Test extends BaseTest {
@@ -280,6 +283,33 @@ public class FhirInstanceValidatorR4Test extends BaseTest {
assertEquals("Primitive types must have a value that is not empty", all.get(0).getMessage());
}
+ /**
+ * See #1740
+ */
+ @Ignore
+ @Test
+ public void testValidateScalarInRepeatableField() {
+ String operationDefinition = "{\n" +
+ " \"resourceType\": \"OperationDefinition\",\n" +
+ " \"name\": \"Questionnaire\",\n" +
+ " \"status\": \"draft\",\n" +
+ " \"kind\" : \"operation\",\n" +
+ " \"code\": \"populate\",\n" +
+ " \"resource\": \"Patient\",\n" + // should be array
+ " \"system\": false,\n" + " " +
+ " \"type\": false,\n" +
+ " \"instance\": true\n" +
+ "}";
+
+ FhirValidator val = ourCtx.newValidator();
+ val.registerValidatorModule(new FhirInstanceValidator(myDefaultValidationSupport));
+
+ ValidationResult result = val.validateWithResult(operationDefinition);
+ List<SingleValidationMessage> all = logResultsAndReturnAll(result);
+ assertFalse(result.isSuccessful());
+ assertEquals("Primitive types must have a value that is not empty", all.get(0).getMessage());
+ }
+
/**
* See #1676 - We should ignore schema location
*/
@@ -658,7 +688,6 @@ public class FhirInstanceValidatorR4Test extends BaseTest {
.setCode("acd");
-
// Should pass
ValidationResult output = val.validateWithResult(input);
List<SingleValidationMessage> all = logResultsAndReturnErrorOnes(output);
