-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom participant attribute API backwards compatibilty test
Currently, there was no coverage for adding custom participant attributes to protocols in the backwards compatibility tests. The test resource also serves as an example on how such a JSON request looks like.
- Loading branch information
1 parent
1d0d2df
commit c03ecea
Showing
2 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
...Service/1.1/ProtocolServiceTest/add_protocol_with_expected_participant_data_succeeds.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
[ | ||
{ | ||
"outcome": "Succeeded", | ||
"request": { | ||
"__type": "dk.cachet.carp.protocols.infrastructure.ProtocolServiceRequest.Add", | ||
"apiVersion": "1.1", | ||
"protocol": { | ||
"id": "b2e7a95f-1cf2-4f25-9671-d3cd5eeaae1c", | ||
"createdOn": "2023-12-10T18:30:52.775778700Z", | ||
"version": 0, | ||
"ownerId": "27879e75-ccc1-4866-9ab3-4ece1b735052", | ||
"name": "Test protocol", | ||
"description": "Test description", | ||
"expectedParticipantData": [ | ||
{ | ||
"attribute": { | ||
"__type": "dk.cachet.carp.common.application.users.ParticipantAttribute.DefaultParticipantAttribute", | ||
"inputDataType": "dk.cachet.carp.input.sex" | ||
} | ||
}, | ||
{ | ||
"attribute": { | ||
"__type": "dk.cachet.carp.common.application.users.ParticipantAttribute.CustomParticipantAttribute", | ||
"input": { | ||
"__type": "dk.cachet.carp.common.application.data.input.elements.Text", | ||
"prompt": "Social Security Number" | ||
}, | ||
"inputDataType": "dk.cachet.carp.input.custom.6dc4b930d73c45cd8c7017f9fd823fe6" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"precedingEvents": [ | ||
], | ||
"publishedEvents": [ | ||
], | ||
"response": { | ||
} | ||
}, | ||
{ | ||
"outcome": "Succeeded", | ||
"request": { | ||
"__type": "dk.cachet.carp.protocols.infrastructure.ProtocolServiceRequest.GetBy", | ||
"apiVersion": "1.1", | ||
"protocolId": "b2e7a95f-1cf2-4f25-9671-d3cd5eeaae1c" | ||
}, | ||
"precedingEvents": [ | ||
], | ||
"publishedEvents": [ | ||
], | ||
"response": { | ||
"id": "b2e7a95f-1cf2-4f25-9671-d3cd5eeaae1c", | ||
"createdOn": "2023-12-10T18:30:52.775778700Z", | ||
"version": 0, | ||
"ownerId": "27879e75-ccc1-4866-9ab3-4ece1b735052", | ||
"name": "Test protocol", | ||
"description": "Test description", | ||
"expectedParticipantData": [ | ||
{ | ||
"attribute": { | ||
"__type": "dk.cachet.carp.common.application.users.ParticipantAttribute.DefaultParticipantAttribute", | ||
"inputDataType": "dk.cachet.carp.input.sex" | ||
} | ||
}, | ||
{ | ||
"attribute": { | ||
"__type": "dk.cachet.carp.common.application.users.ParticipantAttribute.CustomParticipantAttribute", | ||
"input": { | ||
"__type": "dk.cachet.carp.common.application.data.input.elements.Text", | ||
"prompt": "Social Security Number" | ||
}, | ||
"inputDataType": "dk.cachet.carp.input.custom.6dc4b930d73c45cd8c7017f9fd823fe6" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] |