Fix unit tests failing due to OperationDefinition changes
This commit is contained in:
parent
41283d4ed4
commit
57ee1fe220
|
@ -223,6 +223,12 @@ public class RestfulServer extends HttpServlet {
|
|||
|
||||
count++;
|
||||
|
||||
if (foundMethodBinding instanceof ConformanceMethodBinding) {
|
||||
myServerConformanceMethod = foundMethodBinding;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (!Modifier.isPublic(m.getModifiers())) {
|
||||
throw new ConfigurationException("Method '" + m.getName() + "' is not public, FHIR RESTful methods must be public");
|
||||
} else {
|
||||
|
@ -822,7 +828,7 @@ public class RestfulServer extends HttpServlet {
|
|||
if (confProvider == null) {
|
||||
confProvider = getFhirContext().getVersion().createServerConformanceProvider(this);
|
||||
}
|
||||
findSystemMethods(confProvider);
|
||||
// findSystemMethods(confProvider);
|
||||
findResourceMethods(confProvider);
|
||||
|
||||
} catch (Exception ex) {
|
||||
|
|
|
@ -47,9 +47,6 @@ import ca.uhn.fhir.rest.annotation.Read;
|
|||
import ca.uhn.fhir.rest.client.IGenericClient;
|
||||
import ca.uhn.fhir.util.PortUtil;
|
||||
|
||||
/**
|
||||
* Created by dsotnikov on 2/25/2014.
|
||||
*/
|
||||
public class OperationServerTest {
|
||||
private static CloseableHttpClient ourClient;
|
||||
private static FhirContext ourCtx;
|
||||
|
|
|
@ -282,7 +282,7 @@ public class ServerConformanceProviderDstu2Test {
|
|||
String conf = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(conformance);
|
||||
ourLog.info(conf);
|
||||
|
||||
RestResource res = conformance.getRestFirstRep().getResourceFirstRep();
|
||||
RestResource res = conformance.getRest().get(0).getResource().get(1);
|
||||
assertEquals("Patient", res.getType());
|
||||
|
||||
assertTrue(res.getConditionalCreate());
|
||||
|
@ -305,7 +305,7 @@ public class ServerConformanceProviderDstu2Test {
|
|||
String conf = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(conformance);
|
||||
ourLog.info(conf);
|
||||
|
||||
RestResource res = conformance.getRestFirstRep().getResourceFirstRep();
|
||||
RestResource res = conformance.getRest().get(0).getResource().get(1);
|
||||
assertEquals("Patient", res.getType());
|
||||
|
||||
assertNull(res.getConditionalCreate());
|
||||
|
|
|
@ -282,7 +282,7 @@ public class ServerConformanceProviderHl7OrgDstu2Test {
|
|||
String conf = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(conformance);
|
||||
ourLog.info(conf);
|
||||
|
||||
ConformanceRestResourceComponent res = conformance.getRest().get(0).getResource().get(0);
|
||||
ConformanceRestResourceComponent res = conformance.getRest().get(0).getResource().get(1);
|
||||
assertEquals("Patient", res.getType());
|
||||
|
||||
assertTrue(res.getConditionalCreate());
|
||||
|
@ -305,7 +305,7 @@ public class ServerConformanceProviderHl7OrgDstu2Test {
|
|||
String conf = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(conformance);
|
||||
ourLog.info(conf);
|
||||
|
||||
ConformanceRestResourceComponent res = conformance.getRest().get(0).getResource().get(0);
|
||||
ConformanceRestResourceComponent res = conformance.getRest().get(0).getResource().get(1);
|
||||
assertEquals("Patient", res.getType());
|
||||
|
||||
assertNull(res.getConditionalCreateElement().getValue());
|
||||
|
|
Loading…
Reference in New Issue