Add broken test

This commit is contained in:
Tadgh
2021-09-09 14:41:38 -04:00
parent 6e2836b91d
commit f3ea6803da

View File

@@ -1,9 +1,12 @@
package ca.uhn.fhir.jpa.starter; package ca.uhn.fhir.jpa.starter;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.jpa.partition.SystemRequestDetails;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
import ca.uhn.fhir.rest.api.CacheControlDirective; import ca.uhn.fhir.rest.api.CacheControlDirective;
import ca.uhn.fhir.rest.api.EncodingEnum; import ca.uhn.fhir.rest.api.EncodingEnum;
import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.api.MethodOutcome;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum; import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
@@ -86,6 +89,57 @@ class ExampleServerR4IT {
} }
} }
@Test
public void testBatchPutWithIdenticalTags() {
String batchPuts = "{\n" +
"\t\"resourceType\": \"Bundle\",\n" +
"\t\"id\": \"patients\",\n" +
"\t\"type\": \"batch\",\n" +
"\t\"entry\": [\n" +
"\t\t{\n" +
"\t\t\t\"request\": {\n" +
"\t\t\t\t\"method\": \"PUT\",\n" +
"\t\t\t\t\"url\": \"Patient/pat-1\"\n" +
"\t\t\t},\n" +
"\t\t\t\"resource\": {\n" +
"\t\t\t\t\"resourceType\": \"Patient\",\n" +
"\t\t\t\t\"id\": \"pat-1\",\n" +
"\t\t\t\t\"meta\": {\n" +
"\t\t\t\t\t\"tag\": [\n" +
"\t\t\t\t\t\t{\n" +
"\t\t\t\t\t\t\t\"system\": \"http://mysystem.org\",\n" +
"\t\t\t\t\t\t\t\"code\": \"value2\"\n" +
"\t\t\t\t\t\t}\n" +
"\t\t\t\t\t]\n" +
"\t\t\t\t}\n" +
"\t\t\t},\n" +
"\t\t\t\"fullUrl\": \"/Patient/pat-1\"\n" +
"\t\t},\n" +
"\t\t{\n" +
"\t\t\t\"request\": {\n" +
"\t\t\t\t\"method\": \"PUT\",\n" +
"\t\t\t\t\"url\": \"Patient/pat-2\"\n" +
"\t\t\t},\n" +
"\t\t\t\"resource\": {\n" +
"\t\t\t\t\"resourceType\": \"Patient\",\n" +
"\t\t\t\t\"id\": \"pat-2\",\n" +
"\t\t\t\t\"meta\": {\n" +
"\t\t\t\t\t\"tag\": [\n" +
"\t\t\t\t\t\t{\n" +
"\t\t\t\t\t\t\t\"system\": \"http://mysystem.org\",\n" +
"\t\t\t\t\t\t\t\"code\": \"value2\"\n" +
"\t\t\t\t\t\t}\n" +
"\t\t\t\t\t]\n" +
"\t\t\t\t}\n" +
"\t\t\t},\n" +
"\t\t\t\"fullUrl\": \"/Patient/pat-2\"\n" +
"\t\t}\n" +
"\t]\n" +
"}";
Bundle bundle = FhirContext.forR4().newJsonParser().parseResource(Bundle.class, batchPuts);
ourClient.transaction().withBundle(bundle).execute();
}
@Test @Test
@Order(1) @Order(1)
void testWebsocketSubscription() throws Exception { void testWebsocketSubscription() throws Exception {