Test fixes
This commit is contained in:
parent
3ba194acbe
commit
8bb010bb18
|
@ -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();
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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())) {
|
||||
|
|
Loading…
Reference in New Issue