Fix compile errors

This commit is contained in:
James 2017-05-22 16:42:51 -04:00
parent 6dbcd0fc31
commit d54b62ffe4
2 changed files with 15 additions and 0 deletions

View File

@ -25,6 +25,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.io.StringReader;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@ -33,6 +34,8 @@ import java.util.concurrent.ConcurrentHashMap;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.commons.lang3.ObjectUtils;
import ca.uhn.fhir.rest.client.api.IHttpResponse;
/**
@ -117,5 +120,11 @@ public class JaxRsHttpResponse implements IHttpResponse {
return myResponse.readEntity(java.io.InputStream.class);
}
@Override
public List<String> getHeaders(String theName) {
List<String> retVal = myResponse.getStringHeaders().get(theName);
return retVal;
}
}

View File

@ -125,6 +125,8 @@ public class SubscriptionsDstu3Test extends BaseResourceProviderDstu3Test {
public void testCreateInvalidNoStatus() {
Subscription subs = new Subscription();
subs.getChannel().setType(SubscriptionChannelType.RESTHOOK);
subs.getChannel().setPayload("application/fhir+json");
subs.getChannel().setEndpoint("http://localhost:8888");
subs.setCriteria("Observation?identifier=123");
try {
ourClient.create().resource(subs).execute();
@ -362,6 +364,8 @@ public class SubscriptionsDstu3Test extends BaseResourceProviderDstu3Test {
public void testUpdateFails() {
Subscription subs = new Subscription();
subs.getChannel().setType(SubscriptionChannelType.RESTHOOK);
subs.getChannel().setPayload("application/fhir+json");
subs.getChannel().setEndpoint("http://localhost:8888");
subs.setStatus(SubscriptionStatus.REQUESTED);
subs.setCriteria("Observation?identifier=123");
IIdType id = ourClient.create().resource(subs).execute().getId().toUnqualifiedVersionless();
@ -392,6 +396,8 @@ public class SubscriptionsDstu3Test extends BaseResourceProviderDstu3Test {
public void testUpdateToInvalidStatus() {
Subscription subs = new Subscription();
subs.getChannel().setType(SubscriptionChannelType.RESTHOOK);
subs.getChannel().setPayload("application/fhir+json");
subs.getChannel().setEndpoint("http://localhost:8888");
subs.setCriteria("Observation?identifier=123");
subs.setStatus(SubscriptionStatus.REQUESTED);
IIdType id = ourClient.create().resource(subs).execute().getId();