This folder contains unit tests for the RESTful technical profile. For more information, check out the Define an RESTful technical profile in an Azure AD B2C custom policy article.
This unit test that demonstrates how to send a claim in a query string parameter of the REST api HTTP request. It uses the <Item Key="SendClaimsIn">QueryString</Item>
metadata. The unit test invokes the https://genderize.io/ API. For more information, check out the https://genderize.io/ documentation.
To test this policy:
- Run the B2C_1A_TP_Restful_SendClaimsIn_QueryString policy.
- Type a name, or except the default one 'Jessica', and select Continue.
- The next orchestration step calls the REST API, sending the givenName as a name query string parameter to the API
- The next orchestration step renders the result of the API, which includes the gender and the count (represents the number of data rows examined in order to calculate the response) of the name you typed.
The unit test defines the following components:
- ExperimentalSetupTechnicalProfile - Self-asserted technical profile where you provide the name to be checked.
- ExperimentalTechnicalProfile-GenderiseAPI - The unit test.
- ResultTechnicalProfile - self-asserted technical profile. This technical profile shows the
result
of this unit test.