Test fixes

This commit is contained in:
jamesagnew 2019-06-22 17:42:02 -04:00
parent 3ba194acbe
commit 8bb010bb18
7 changed files with 6 additions and 12 deletions

View File

@ -85,7 +85,7 @@ public class FhirResourceDaoSubscriptionDstu2 extends FhirResourceDaoDstu2<Subsc
public RuntimeResourceDefinition validateCriteriaAndReturnResourceDefinition(Subscription theResource) {
if (theResource.getStatus() == null) {
throw new UnprocessableEntityException("Can not process submitted Subscription - Subscription.status must be populated");
throw new UnprocessableEntityException("Can not process submitted Subscription - Subscription.status must be populated on this server");
}
String query = theResource.getCriteria();

View File

@ -107,7 +107,7 @@ public class FhirResourceDaoSubscriptionDstu3 extends FhirResourceDaoDstu3<Subsc
public RuntimeResourceDefinition validateCriteriaAndReturnResourceDefinition(Subscription theResource) {
if (theResource.getStatus() == null) {
throw new UnprocessableEntityException("Can not process submitted Subscription - Subscription.status must be populated");
throw new UnprocessableEntityException("Can not process submitted Subscription - Subscription.status must be populated on this server");
}
switch (theResource.getStatus()) {

View File

@ -104,7 +104,7 @@ public class FhirResourceDaoSubscriptionR4 extends FhirResourceDaoR4<Subscriptio
@Nullable
public RuntimeResourceDefinition validateCriteriaAndReturnResourceDefinition(Subscription theResource) {
if (theResource.getStatus() == null) {
throw new UnprocessableEntityException("Can not process submitted Subscription - Subscription.status must be populated");
throw new UnprocessableEntityException("Can not process submitted Subscription - Subscription.status must be populated on this server");
}
switch (theResource.getStatus()) {
@ -166,11 +166,6 @@ public class FhirResourceDaoSubscriptionR4 extends FhirResourceDaoR4<Subscriptio
throw new UnprocessableEntityException("Subscription.channel.type must be populated on this server");
}
SubscriptionStatus status = theResource.getStatus();
if (status == null) {
throw new UnprocessableEntityException("Subscription.status must be populated on this server");
}
}
}

View File

@ -311,7 +311,7 @@ public class RestHookTestDstu2Test extends BaseResourceProviderDstu2Test {
ourClient.create().resource(subscription).execute();
fail();
} catch (UnprocessableEntityException e) {
assertThat(e.getMessage(), containsString("Can not process submitted Subscription - Subscription.status must be populated"));
assertThat(e.getMessage(), containsString("Can not process submitted Subscription - Subscription.status must be populated on this server"));
}
}

View File

@ -531,7 +531,7 @@ public class RestHookTestDstu3Test extends BaseResourceProviderDstu3Test {
ourClient.create().resource(subscription).execute();
fail();
} catch (UnprocessableEntityException e) {
assertThat(e.getMessage(), containsString("Can not process submitted Subscription - Subscription.status must be populated"));
assertThat(e.getMessage(), containsString("Can not process submitted Subscription - Subscription.status must be populated on this server"));
}
}

View File

@ -886,7 +886,7 @@ public class RestHookTestR4Test extends BaseSubscriptionsR4Test {
ourClient.create().resource(subscription).execute();
fail();
} catch (UnprocessableEntityException e) {
assertThat(e.getMessage(), containsString("Can not process submitted Subscription - Subscription.status must be populated"));
assertThat(e.getMessage(), containsString("Can not process submitted Subscription - Subscription.status must be populated on this server"));
}
}

View File

@ -226,7 +226,6 @@ public class Dstu3BundleFactory implements IVersionSpecificBundleFactory {
switch (theBundleType) {
case BATCH_RESPONSE:
case TRANSACTION_RESPONSE:
case HISTORY:
if ("1".equals(id.getVersionIdPart())) {
entry.getResponse().setStatus("201 Created");
} else if (isNotBlank(id.getVersionIdPart())) {