Fix unit tests failing due to OperationDefinition changes

This commit is contained in:
jamesagnew 2015-07-18 14:43:59 -04:00
parent 41283d4ed4
commit 57ee1fe220
4 changed files with 12 additions and 9 deletions

View File

@ -220,8 +220,14 @@ public class RestfulServer extends HttpServlet {
if (foundMethodBinding == null) {
continue;
}
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");
@ -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) {

View File

@ -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;

View File

@ -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());

View File

@ -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());