ml-testing-toolkit 18.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/.dockerignore +10 -0
  2. package/.grype.yaml +16 -0
  3. package/.ncurc.yaml +9 -0
  4. package/.nvmrc +1 -0
  5. package/.versionrc.js +16 -0
  6. package/CHANGELOG.md +504 -0
  7. package/CODEOWNERS +30 -0
  8. package/Dockerfile +42 -0
  9. package/Dockerfile-newman +13 -0
  10. package/LICENSE.md +9 -0
  11. package/README.md +119 -0
  12. package/assets/diagrams/architectural/architectural-diagram.svg +3 -0
  13. package/assets/diagrams/flow/flow-diagram.svg +3 -0
  14. package/assets/images/Sample-Response-Failure.png +0 -0
  15. package/assets/images/Screenshot 2020-04-16 at 22.58.04.png +0 -0
  16. package/assets/images/TLS-Enabled-on-Environment.png +0 -0
  17. package/assets/images/adapter-mutual-tls-enabled.png +0 -0
  18. package/assets/images/add-additional-input-values.png +0 -0
  19. package/assets/images/add-condition-button.png +0 -0
  20. package/assets/images/add-new-assertion.png +0 -0
  21. package/assets/images/add-new-input-value.png +0 -0
  22. package/assets/images/add-new-input-variable.png +0 -0
  23. package/assets/images/additional-transfers.png +0 -0
  24. package/assets/images/api-provisioning-add-new-api-confirmation.png +0 -0
  25. package/assets/images/api-provisioning-file-input-window.png +0 -0
  26. package/assets/images/api-provisioning-list-apis-view.png +0 -0
  27. package/assets/images/api-provisioning-menu-item.png +0 -0
  28. package/assets/images/apply_and_restart.jpg +0 -0
  29. package/assets/images/assess-request-or-response.png +0 -0
  30. package/assets/images/assess-response-equation-save.png +0 -0
  31. package/assets/images/assess-response-equation.png +0 -0
  32. package/assets/images/assess-response-status.png +0 -0
  33. package/assets/images/building-new-rules-file.png +0 -0
  34. package/assets/images/callback-rules-screen.png +0 -0
  35. package/assets/images/configurable-parameter-assertion.png +0 -0
  36. package/assets/images/configurable-parameter-currency.png +0 -0
  37. package/assets/images/configurable-parameter.png +0 -0
  38. package/assets/images/connection-manager-ui-opening.png +0 -0
  39. package/assets/images/create-inbound-user-simulator.png +0 -0
  40. package/assets/images/creating-new-rule-file.png +0 -0
  41. package/assets/images/dfsp-client-cacert.png +0 -0
  42. package/assets/images/dfsp-client-submit.png +0 -0
  43. package/assets/images/dfsp-client.png +0 -0
  44. package/assets/images/dfsp-p2p-happy-path.png +0 -0
  45. package/assets/images/dfsp-server-cacert.png +0 -0
  46. package/assets/images/dfsp-server-cert.png +0 -0
  47. package/assets/images/download-report.png +0 -0
  48. package/assets/images/drive_have_not_been_shared.jpg +0 -0
  49. package/assets/images/event-response-options.png +0 -0
  50. package/assets/images/expand-monitoring-messages.png +0 -0
  51. package/assets/images/fixed-response-sample.png +0 -0
  52. package/assets/images/header-selection.png +0 -0
  53. package/assets/images/heap_error_windows.jpg +0 -0
  54. package/assets/images/hosted-mode-docker-compose-intro.png +0 -0
  55. package/assets/images/hub-client-cert.png +0 -0
  56. package/assets/images/import-template.png +0 -0
  57. package/assets/images/inbound-requests-environment.png +0 -0
  58. package/assets/images/inbound-requests-scripts.png +0 -0
  59. package/assets/images/jws-certificate-submit.png +0 -0
  60. package/assets/images/jws-certificate.png +0 -0
  61. package/assets/images/jws-certs-keys.png +0 -0
  62. package/assets/images/jws-hub-certs-keys.png +0 -0
  63. package/assets/images/local-enable-jws-publickey.png +0 -0
  64. package/assets/images/local-mutual-tls-enabled.png +0 -0
  65. package/assets/images/local_drives_to_be_available.jpg +0 -0
  66. package/assets/images/mcm-environment-opening.png +0 -0
  67. package/assets/images/menu-items.png +0 -0
  68. package/assets/images/mock-response-sample.png +0 -0
  69. package/assets/images/monitoring-initial-state.png +0 -0
  70. package/assets/images/monitoring-messages.png +0 -0
  71. package/assets/images/new-empty-assertion.png +0 -0
  72. package/assets/images/opened-imported-template.png +0 -0
  73. package/assets/images/opening-default-settings.png +0 -0
  74. package/assets/images/opening-sync-response-rules.png +0 -0
  75. package/assets/images/opening-view.png +0 -0
  76. package/assets/images/outbound-display-opening-hub.png +0 -0
  77. package/assets/images/outbound-display-opening.png +0 -0
  78. package/assets/images/override-with-environment-variable.png +0 -0
  79. package/assets/images/populate-with-sample-body.png +0 -0
  80. package/assets/images/resource-selection.png +0 -0
  81. package/assets/images/rule-builder-select-api.png +0 -0
  82. package/assets/images/sample-condition-add-configurable-params.png +0 -0
  83. package/assets/images/sample-condition.png +0 -0
  84. package/assets/images/sample-editor.png +0 -0
  85. package/assets/images/sample-request.png +0 -0
  86. package/assets/images/sample-test-assertion.png +0 -0
  87. package/assets/images/send-transfer.png +0 -0
  88. package/assets/images/sending-single-test-case-1.png +0 -0
  89. package/assets/images/sending-single-test-case-2.png +0 -0
  90. package/assets/images/sending-test-cases.png +0 -0
  91. package/assets/images/server-certificates-submitted.png +0 -0
  92. package/assets/images/simulator-response.png +0 -0
  93. package/assets/images/simulator-scheme-adapter-endpoint.png +0 -0
  94. package/assets/images/summarized-view-of-rule.png +0 -0
  95. package/assets/images/template-window.png +0 -0
  96. package/assets/images/test-case-editor-console-log.png +0 -0
  97. package/assets/images/test-case-editor-environment-state.png +0 -0
  98. package/assets/images/test-case-editor-scripts.png +0 -0
  99. package/assets/images/test-case-editor.png +0 -0
  100. package/assets/images/testcase-definition-download.png +0 -0
  101. package/assets/images/testcase-definition-edit-meta-info.png +0 -0
  102. package/assets/images/testing-toolkit-mojaloop-testing-toolkit-endpoint.png +0 -0
  103. package/assets/images/tls-hub-certs-keys.png +0 -0
  104. package/assets/images/tls-jws-enabled-on-environment.png +0 -0
  105. package/assets/images/updated-sample-body-data.png +0 -0
  106. package/assets/images/using-configurable-parameter.png +0 -0
  107. package/assets/images/validation-rules-screen.png +0 -0
  108. package/assets/images/view-response.png +0 -0
  109. package/audit-ci.jsonc +7 -0
  110. package/connection-manager/docker-compose.yml +55 -0
  111. package/database/docker-compose.yml +16 -0
  112. package/docker/hosted-mode/docker-compose.yaml +107 -0
  113. package/docker/hosted-mode/keycloak/keycloak-realm.json +2298 -0
  114. package/docker/hosted-mode/mongo-init.sh +1 -0
  115. package/docker/hosted-mode-tls/docker-compose.yaml +171 -0
  116. package/docker/hosted-mode-tls/keycloak/keycloak-realm.json +2298 -0
  117. package/docker/hosted-mode-tls/mongo-init.sh +1 -0
  118. package/docker-compose.yml +62 -0
  119. package/documents/Mojaloop-Testing-Toolkit.md +296 -0
  120. package/documents/RULES_ENGINE.md +403 -0
  121. package/documents/User-Guide-API-Provisioning.md +121 -0
  122. package/documents/User-Guide-CLI.md +218 -0
  123. package/documents/User-Guide-Connection-Manager.md +282 -0
  124. package/documents/User-Guide-Frequently-Asked-Questions.md +39 -0
  125. package/documents/User-Guide-Hosted-Mode-Docker-Compose.md +110 -0
  126. package/documents/User-Guide-Installation.md +163 -0
  127. package/documents/User-Guide-Mojaloop-Testing-Toolkit.md +642 -0
  128. package/documents/User-Guide-OAuth-Server-Deployment.md +283 -0
  129. package/documents/User-Guide-Onboarding-DFSP.md +197 -0
  130. package/documents/User-Guide-Onboarding-HUB.md +191 -0
  131. package/documents/User-Guide.md +53 -0
  132. package/examples/collections/dfsp/p2p_failed_tests.json +7161 -0
  133. package/examples/collections/dfsp/p2p_fx_happy_path.json +502 -0
  134. package/examples/collections/dfsp/p2p_happy_path.json +350 -0
  135. package/examples/collections/dfsp/p2p_happy_path_extended.json +6106 -0
  136. package/examples/collections/dfsp/p2p_happy_path_jws.json +511 -0
  137. package/examples/collections/dfsp/p2p_payee_assertions_websocket.json +441 -0
  138. package/examples/collections/dfsp/sample.json +5029 -0
  139. package/examples/collections/dfsp/transaction_request_service.json +240 -0
  140. package/examples/collections/fxp/FXP.json +264 -0
  141. package/examples/collections/fxp/SDK_backend.json +98 -0
  142. package/examples/collections/fxp/SDK_outbound.json +163 -0
  143. package/examples/collections/hub/hub_01_p2p_happy_path/hub_p2p_receive_quote.json +400 -0
  144. package/examples/collections/hub/hub_01_p2p_happy_path/hub_p2p_send_quote.json +395 -0
  145. package/examples/collections/hub/hub_02_block_transfer/hub_block_transfer.json +393 -0
  146. package/examples/collections/hub/hub_03_funds_in_out/hub_funds_in.json +224 -0
  147. package/examples/collections/hub/hub_03_funds_in_out/hub_funds_out.json +780 -0
  148. package/examples/collections/hub/hub_04_settlements/hub_settlements.json +3138 -0
  149. package/examples/collections/hub/hub_05_transfer_negative_scenarios/hub_transfer_negative_payee_abort.json +475 -0
  150. package/examples/collections/hub/hub_05_transfer_negative_scenarios/hub_transfer_negative_payee_invalid_fulfillment.json +370 -0
  151. package/examples/collections/hub/hub_05_transfer_negative_scenarios/hub_transfer_negative_transfer_timeout.json +262 -0
  152. package/examples/collections/hub/hub_06_transaction_requests_service/hub_trs_authorizations.json +117 -0
  153. package/examples/collections/hub/hub_06_transaction_requests_service/hub_trs_error_framework.json +591 -0
  154. package/examples/collections/hub/hub_06_transaction_requests_service/hub_trs_received_state.json +379 -0
  155. package/examples/collections/hub/hub_06_transaction_requests_service/hub_trs_reject_state.json +361 -0
  156. package/examples/collections/hub/hub_07_quoting_service.json +525 -0
  157. package/examples/collections/hub/hub_08_participant_inactive_stop_transfers.json +706 -0
  158. package/examples/collections/hub/hub_09_duplicate_handling_transfers.json +1377 -0
  159. package/examples/collections/hub/hub_10_on_us_transfers.json +245 -0
  160. package/examples/collections/hub/hub_11_accented_and_spl_chars.json +629 -0
  161. package/examples/collections/hub/hub_12_fspiop_version_1.1.json +646 -0
  162. package/examples/collections/hub/hub_13_bulk_transfers.json +1857 -0
  163. package/examples/collections/iso20022/self_referencing_iso20022.json +926 -0
  164. package/examples/collections/provisioning/testingtoolkitdfsp.json +904 -0
  165. package/examples/environments/dfsp_local_environment.json +46 -0
  166. package/examples/environments/hub_local_environment.json +57 -0
  167. package/jest.config.js +17 -0
  168. package/package.json +199 -0
  169. package/sbom-v18.12.4.csv +1553 -0
  170. package/secrets/keygen.sh +5 -0
  171. package/secrets/privatekey.pem +27 -0
  172. package/secrets/publickey.cer +21 -0
  173. package/secrets/tls/01.pem +132 -0
  174. package/secrets/tls/createSecrets.sh +20 -0
  175. package/secrets/tls/hub_client.csr +32 -0
  176. package/secrets/tls/hub_client_cacert.pem +35 -0
  177. package/secrets/tls/hub_client_cakey.pem +52 -0
  178. package/secrets/tls/hub_client_key.key +52 -0
  179. package/secrets/tls/hub_server.csr +31 -0
  180. package/secrets/tls/hub_server_cacert.pem +35 -0
  181. package/secrets/tls/hub_server_cakey.pem +52 -0
  182. package/secrets/tls/hub_server_cert.pem +132 -0
  183. package/secrets/tls/hub_server_key.key +52 -0
  184. package/secrets/tls/index.txt +1 -0
  185. package/secrets/tls/index.txt.attr +1 -0
  186. package/secrets/tls/openssl-client.cnf +36 -0
  187. package/secrets/tls/openssl-clientca.cnf +71 -0
  188. package/secrets/tls/openssl-server.cnf +39 -0
  189. package/secrets/tls/openssl-serverca.cnf +71 -0
  190. package/secrets/tls/serial.txt +1 -0
  191. package/spec_files/api_definitions/als_admin_1.1/api_spec.yaml +804 -0
  192. package/spec_files/api_definitions/central_admin_1.0/api_spec.yaml +1850 -0
  193. package/spec_files/api_definitions/central_admin_1.0/response_map.json +96 -0
  194. package/spec_files/api_definitions/central_admin_old_9.3/api_spec.yaml +2467 -0
  195. package/spec_files/api_definitions/central_admin_old_9.3/response_map.json +96 -0
  196. package/spec_files/api_definitions/fspiop_1.0/api_spec.yaml +4187 -0
  197. package/spec_files/api_definitions/fspiop_1.0/callback_map.json +568 -0
  198. package/spec_files/api_definitions/fspiop_1.0/mockRef.json +79 -0
  199. package/spec_files/api_definitions/fspiop_1.0/trigger_templates/transaction_request_followup.json +126 -0
  200. package/spec_files/api_definitions/fspiop_1.0/trigger_templates/transaction_request_followup_quotes_only.json +97 -0
  201. package/spec_files/api_definitions/fspiop_1.1/api_spec.yaml +3778 -0
  202. package/spec_files/api_definitions/fspiop_1.1/callback_map.json +568 -0
  203. package/spec_files/api_definitions/fspiop_1.1/mockRef.json +79 -0
  204. package/spec_files/api_definitions/fspiop_1.1/trigger_templates/transaction_request_followup.json +125 -0
  205. package/spec_files/api_definitions/fspiop_2.0/api_spec.yaml +4839 -0
  206. package/spec_files/api_definitions/fspiop_2.0/callback_map.json +716 -0
  207. package/spec_files/api_definitions/fspiop_2.0/mockRef.json +79 -0
  208. package/spec_files/api_definitions/fspiop_2.0/trigger_templates/transaction_request_followup.json +125 -0
  209. package/spec_files/api_definitions/fspiop_2.0_iso20022/api_spec.yaml +8331 -0
  210. package/spec_files/api_definitions/fspiop_2.0_iso20022/callback_map.json +508 -0
  211. package/spec_files/api_definitions/fspiop_2.0_iso20022/mockRef.json +66 -0
  212. package/spec_files/api_definitions/fx-api_2.0/api_spec.yaml +1768 -0
  213. package/spec_files/api_definitions/fx-api_2.0/callback_map.json +188 -0
  214. package/spec_files/api_definitions/fx-api_2.0/mockRef.json +83 -0
  215. package/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml +2612 -0
  216. package/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json +22 -0
  217. package/spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json +35 -0
  218. package/spec_files/api_definitions/mojaloop_simulator_0.1/api_spec.yaml +225 -0
  219. package/spec_files/api_definitions/mojaloop_simulator_sim_1.4/api_spec.yaml +1087 -0
  220. package/spec_files/api_definitions/mojaloop_simulator_sim_1.4/mockRef.json +75 -0
  221. package/spec_files/api_definitions/mojaloop_simulator_sim_1.4/response_map.json +55 -0
  222. package/spec_files/api_definitions/payment_manager_1.4/api_spec.yaml +1389 -0
  223. package/spec_files/api_definitions/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets_2.1/api_spec.yaml +2834 -0
  224. package/spec_files/api_definitions/sdk-scheme-adapter-outbound-v2_1_0-openapi3-snippets_2.1/api_spec.yaml +3449 -0
  225. package/spec_files/api_definitions/settlements_1.0/api_spec.yaml +983 -0
  226. package/spec_files/api_definitions/settlements_1.0/mockRef.json +38 -0
  227. package/spec_files/api_definitions/settlements_1.0/response_map.json +34 -0
  228. package/spec_files/api_definitions/settlements_2.0/api_spec.yaml +1001 -0
  229. package/spec_files/api_definitions/settlements_2.0/mockRef.json +38 -0
  230. package/spec_files/api_definitions/settlements_2.0/response_map.json +34 -0
  231. package/spec_files/api_definitions/thirdparty_sdk_outbound_0.1/api_spec.yaml +2139 -0
  232. package/spec_files/reports/templates/newman/html_template.html +1202 -0
  233. package/spec_files/reports/templates/newman/pdf_template.html +790 -0
  234. package/spec_files/reports/templates/testcase_definition/table_view.html +1602 -0
  235. package/spec_files/rules_callback/config.json +3 -0
  236. package/spec_files/rules_callback/default.json +2698 -0
  237. package/spec_files/rules_callback/p2p-limit.json +129 -0
  238. package/spec_files/rules_forward/config.json +3 -0
  239. package/spec_files/rules_forward/default.json +482 -0
  240. package/spec_files/rules_response/config.json +3 -0
  241. package/spec_files/rules_response/default.json +295 -0
  242. package/spec_files/rules_validation/config.json +3 -0
  243. package/spec_files/rules_validation/default.json +1 -0
  244. package/spec_files/rules_validation/p2p-limit.json +55 -0
  245. package/spec_files/system_config.json +175 -0
  246. package/spec_files/user_config.json +109 -0
  247. package/src/index.js +67 -0
  248. package/src/lib/MyEventEmitter.js +54 -0
  249. package/src/lib/api-management.js +143 -0
  250. package/src/lib/api-routes/config.js +83 -0
  251. package/src/lib/api-routes/history.js +139 -0
  252. package/src/lib/api-routes/keycloak.js +54 -0
  253. package/src/lib/api-routes/longpolling.js +70 -0
  254. package/src/lib/api-routes/oauth2.js +149 -0
  255. package/src/lib/api-routes/objectstore.js +53 -0
  256. package/src/lib/api-routes/openapi.js +224 -0
  257. package/src/lib/api-routes/outbound.js +134 -0
  258. package/src/lib/api-routes/reports.js +72 -0
  259. package/src/lib/api-routes/rules.js +356 -0
  260. package/src/lib/api-routes/samples.js +92 -0
  261. package/src/lib/api-routes/server-logs.js +44 -0
  262. package/src/lib/api-routes/settings.js +71 -0
  263. package/src/lib/api-server.js +135 -0
  264. package/src/lib/arrayStore.js +101 -0
  265. package/src/lib/callbackHandler.js +201 -0
  266. package/src/lib/config.js +177 -0
  267. package/src/lib/configuration-providers/mb-connection-manager.js +625 -0
  268. package/src/lib/db/adapters/dbAdapter.js +184 -0
  269. package/src/lib/db/dfspMockUsers.js +64 -0
  270. package/src/lib/db/models/mongoDBWrapper.js +78 -0
  271. package/src/lib/eventListenerClient/inboundEventListener.js +176 -0
  272. package/src/lib/fileAdapter.js +57 -0
  273. package/src/lib/httpAgentStore.js +135 -0
  274. package/src/lib/importExport.js +186 -0
  275. package/src/lib/jws/JwsSigning.js +141 -0
  276. package/src/lib/loadSamples.js +128 -0
  277. package/src/lib/logger.js +20 -0
  278. package/src/lib/longpollingEmitter.js +56 -0
  279. package/src/lib/metrics.js +51 -0
  280. package/src/lib/mocking/custom-functions/generic.js +57 -0
  281. package/src/lib/mocking/middleware-functions/ilpModel.js +238 -0
  282. package/src/lib/mocking/middleware-functions/quotesAssociation.js +75 -0
  283. package/src/lib/mocking/middleware-functions/transactionRequestsService.js +78 -0
  284. package/src/lib/mocking/openApiDefinitionsModel.js +64 -0
  285. package/src/lib/mocking/openApiMockHandler.js +466 -0
  286. package/src/lib/mocking/openApiRulesEngine.js +492 -0
  287. package/src/lib/mocking/openApiVersionTools.js +136 -0
  288. package/src/lib/mocking/transformers/fspiopToISO20022.js +230 -0
  289. package/src/lib/mocking/transformers/index.js +41 -0
  290. package/src/lib/notificationEmitter.js +64 -0
  291. package/src/lib/oauth/KeycloakHelper.js +220 -0
  292. package/src/lib/oauth/LoginService.js +133 -0
  293. package/src/lib/oauth/OAuthHelper.js +181 -0
  294. package/src/lib/oauth/OAuthValidator.js +118 -0
  295. package/src/lib/oauth/Wso2Client.js +64 -0
  296. package/src/lib/objectStore/inMemoryImpl.js +50 -0
  297. package/src/lib/objectStore/objectStoreInterface.js +51 -0
  298. package/src/lib/objectStore.js +122 -0
  299. package/src/lib/report-generator/generator.js +126 -0
  300. package/src/lib/report-generator/helpers.js +154 -0
  301. package/src/lib/requestLogger.js +190 -0
  302. package/src/lib/resources/wso2carbon-publickey.cert +20 -0
  303. package/src/lib/rulesEngine.js +95 -0
  304. package/src/lib/rulesEngineModel.js +463 -0
  305. package/src/lib/scripting-engines/postman-sandbox.js +142 -0
  306. package/src/lib/scripting-engines/vm-javascript-sandbox.js +294 -0
  307. package/src/lib/server-logs/adapters/elastic-search.js +102 -0
  308. package/src/lib/server-logs/adapters/grafana.js +0 -0
  309. package/src/lib/server-logs/index.js +75 -0
  310. package/src/lib/socket-server.js +55 -0
  311. package/src/lib/storageAdapter.js +109 -0
  312. package/src/lib/test-outbound/TestCaseRunner.js +173 -0
  313. package/src/lib/test-outbound/getTracing.js +19 -0
  314. package/src/lib/test-outbound/outbound-initiator.js +1107 -0
  315. package/src/lib/uniqueIdGenerator.js +35 -0
  316. package/src/lib/utils.js +89 -0
  317. package/src/lib/utilsInternal.js +56 -0
  318. package/src/lib/webSocketClient/WebSocketClientManager.js +197 -0
  319. package/src/server.js +218 -0
@@ -0,0 +1,1857 @@
1
+ {
2
+ "name": "hub-bulk-transfers-tests",
3
+ "test_cases": [
4
+ {
5
+ "id": 1,
6
+ "name": "positive scenario - fulfil",
7
+ "requests": [
8
+ {
9
+ "id": 3,
10
+ "description": "POST Bulk Transfer",
11
+ "apiVersion": {
12
+ "minorVersion": 0,
13
+ "majorVersion": 1,
14
+ "type": "fspiop",
15
+ "asynchronous": true
16
+ },
17
+ "operationPath": "/bulkTransfers",
18
+ "method": "post",
19
+ "url": "{$inputs.HOST_BULK_ADAPTER}",
20
+ "headers": {
21
+ "Accept": "application/vnd.interoperability.bulkTransfers+json;version=1",
22
+ "Content-Type": "application/vnd.interoperability.bulkTransfers+json;version=1.0",
23
+ "Date": "{$environment.headerDate}",
24
+ "FSPIOP-Source": "testingtoolkitdfsp",
25
+ "FSPIOP-Destination": "payeefsp"
26
+ },
27
+ "body": {
28
+ "bulkTransferId": "{$environment.bulkTransferId}",
29
+ "bulkQuoteId": "{$environment.bulkQuoteId}",
30
+ "payeeFsp": "payeefsp",
31
+ "payerFsp": "testingtoolkitdfsp",
32
+ "individualTransfers": [
33
+ {
34
+ "transferId": "{$environment.transferId}",
35
+ "transferAmount": {
36
+ "currency": "{$environment.currency}",
37
+ "amount": "{$environment.amount}"
38
+ },
39
+ "ilpPacket": "{$environment.validIlpPacket2}",
40
+ "condition": "{$environment.validCondition2}",
41
+ "extensionList": {
42
+ "extension": [
43
+ {
44
+ "key": "extKey1",
45
+ "value": "extValue1"
46
+ },
47
+ {
48
+ "key": "extKey2",
49
+ "value": "extValue2"
50
+ }
51
+ ]
52
+ }
53
+ },
54
+ {
55
+ "transferId": "{$environment.transferId2}",
56
+ "transferAmount": {
57
+ "currency": "{$environment.currency2}",
58
+ "amount": "{$environment.amount2}"
59
+ },
60
+ "ilpPacket": "{$environment.validIlpPacket2}",
61
+ "condition": "{$environment.validCondition2}"
62
+ }
63
+ ],
64
+ "expiration": "{$environment.expirationDate}"
65
+ },
66
+ "tests": {
67
+ "assertions": [
68
+ {
69
+ "id": 1,
70
+ "description": "Status code is 202",
71
+ "exec": [
72
+ "expect(response.status).to.equal(202)"
73
+ ]
74
+ },
75
+ {
76
+ "id": 2,
77
+ "description": "payerfsp callback - date header should be set",
78
+ "exec": [
79
+ "expect(callback.headers).to.have.property('date')"
80
+ ]
81
+ },
82
+ {
83
+ "id": 3,
84
+ "description": "payerfsp callback - fspiop-source should be payeefsp",
85
+ "exec": [
86
+ "expect(callback.headers['fspiop-source']).to.equal('payeefsp')"
87
+ ]
88
+ },
89
+ {
90
+ "id": 4,
91
+ "description": "payerfsp callback - fspiop-destination should be testingtoolkitdfsp",
92
+ "exec": [
93
+ "expect(callback.headers['fspiop-destination']).to.equal('testingtoolkitdfsp')"
94
+ ]
95
+ },
96
+ {
97
+ "id": 5,
98
+ "description": "payerfsp callback - fspiop-http-method should be PUT",
99
+ "exec": [
100
+ "expect(callback.headers['fspiop-http-method']).to.equal('PUT')"
101
+ ]
102
+ },
103
+ {
104
+ "id": 6,
105
+ "description": "payerfsp callback - fspiop-uri should be /payerfsp/bulkTransfers/",
106
+ "exec": [
107
+ "expect(callback.headers['fspiop-uri']).to.equal(`/testingtoolkitdfsp/bulkTransfers/${environment.bulkTransferId}`)"
108
+ ]
109
+ },
110
+ {
111
+ "id": 7,
112
+ "description": "payerfsp callback - Bulk Transfer state should be COMPLETED on Payer side",
113
+ "exec": [
114
+ "expect(callback.body.bulkTransferState).to.equal('COMPLETED')"
115
+ ]
116
+ },
117
+ {
118
+ "id": 8,
119
+ "description": "payerfsp callback - Completed timestamp should be set",
120
+ "exec": [
121
+ "expect(callback.body).to.have.property('completedTimestamp')"
122
+ ]
123
+ },
124
+ {
125
+ "id": 9,
126
+ "description": "payerfsp callback - All individual transfer results (failed & successful) should be returned",
127
+ "exec": [
128
+ "expect(callback.body.individualTransferResults.length).to.equal(2)"
129
+ ]
130
+ },
131
+ {
132
+ "id": 10,
133
+ "description": "payerfsp callback - 1st individual transfer should have fulfilment",
134
+ "exec": [
135
+ "const transfer1 = callback.body.individualTransferResults.find(t => t.transferId === environment.transferId);",
136
+ "expect(transfer1).to.have.property('fulfilment')"
137
+ ]
138
+ },
139
+ {
140
+ "id": 11,
141
+ "description": "payerfsp callback - 2nd individual transfer should have fulfilment",
142
+ "exec": [
143
+ "const transfer2 = callback.body.individualTransferResults.find(t => t.transferId === environment.transferId2);",
144
+ "expect(transfer2).to.have.property('fulfilment')"
145
+ ]
146
+ },
147
+ {
148
+ "id": 12,
149
+ "description": "payeefsp callback - date header should be set",
150
+ "exec": [
151
+ "expect(environment.bulkTransfersNegativeCallback.headers).to.have.property('date')"
152
+ ]
153
+ },
154
+ {
155
+ "id": 13,
156
+ "description": "payeefsp callback - fspiop-source should be switch",
157
+ "exec": [
158
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('switch')"
159
+ ]
160
+ },
161
+ {
162
+ "id": 14,
163
+ "description": "payeefsp callback - fspiop-destination should be payeefsp",
164
+ "exec": [
165
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-destination']).to.equal('payeefsp')"
166
+ ]
167
+ },
168
+ {
169
+ "id": 15,
170
+ "description": "payeefsp callback - fspiop-http-method should be PUT",
171
+ "exec": [
172
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-http-method']).to.equal('PUT')"
173
+ ]
174
+ },
175
+ {
176
+ "id": 16,
177
+ "description": "payeefsp callback - fspiop-uri should be as expected",
178
+ "exec": [
179
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-uri']).to.equal(`/payeefsp/bulkTransfers/${environment.bulkTransferId}`)"
180
+ ]
181
+ },
182
+ {
183
+ "id": 17,
184
+ "description": "payeefsp callback - Bulk Transfer state should be COMPLETED on Payee side",
185
+ "exec": [
186
+ "expect(environment.bulkTransfersNegativeCallback.data.bulkTransferState).to.equal('COMPLETED')"
187
+ ]
188
+ },
189
+ {
190
+ "id": 18,
191
+ "description": "payeefsp callback - Completed timestamp should be set",
192
+ "exec": [
193
+ "expect(environment.bulkTransfersNegativeCallback.data).to.have.property('completedTimestamp')"
194
+ ]
195
+ },
196
+ {
197
+ "id": 19,
198
+ "description": "payeefsp callback - All individual transfer results (fulfilments) should be returned",
199
+ "exec": [
200
+ "expect(environment.bulkTransfersNegativeCallback.data.individualTransferResults.length).to.equal(2)"
201
+ ]
202
+ },
203
+ {
204
+ "id": 20,
205
+ "description": "payeefsp callback - 1st individual transfer should have fulfilment",
206
+ "exec": [
207
+ "const transfer1 = environment.bulkTransfersNegativeCallback.data.individualTransferResults.find(t => t.transferId === environment.transferId);",
208
+ "expect(transfer1).to.have.property('fulfilment')"
209
+ ]
210
+ },
211
+ {
212
+ "id": 21,
213
+ "description": "payeefsp callback - 2nd individual transfer should have fulfilment",
214
+ "exec": [
215
+ "const transfer2 = environment.bulkTransfersNegativeCallback.data.individualTransferResults.find(t => t.transferId === environment.transferId2);",
216
+ "expect(transfer2).to.have.property('fulfilment')"
217
+ ]
218
+ },
219
+ {
220
+ "id": 22,
221
+ "description": "payeefsp request - date header should be set",
222
+ "exec": [
223
+ "expect(environment.bulkTransfersNegativeRequest.headers).to.have.property('date')"
224
+ ]
225
+ },
226
+ {
227
+ "id": 23,
228
+ "description": "payeefsp request - fspiop-source should be testingtoolkitdfsp",
229
+ "exec": [
230
+ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('testingtoolkitdfsp')"
231
+ ]
232
+ },
233
+ {
234
+ "id": 24,
235
+ "description": "payeefsp request - fspiop-destination should be payeefsp",
236
+ "exec": [
237
+ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-destination']).to.equal('payeefsp')"
238
+ ]
239
+ },
240
+ {
241
+ "id": 25,
242
+ "description": "payeefsp request - fspiop-http-method should be POST",
243
+ "exec": [
244
+ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-http-method']).to.equal('POST')"
245
+ ]
246
+ },
247
+ {
248
+ "id": 26,
249
+ "description": "payeefsp request - fspiop-uri should be as expected",
250
+ "exec": [
251
+ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-uri']).to.equal('/bulkTransfers')"
252
+ ]
253
+ },
254
+ {
255
+ "id": 27,
256
+ "description": "payeefsp request - Bulk transfer Id should be set",
257
+ "exec": [
258
+ "expect(environment.bulkTransfersNegativeRequest.data.bulkTransferId).to.equal(environment.bulkTransferId)"
259
+ ]
260
+ },
261
+ {
262
+ "id": 28,
263
+ "description": "payeefsp request - Bulk quote Id should be set",
264
+ "exec": [
265
+ "expect(environment.bulkTransfersNegativeRequest.data.bulkQuoteId).to.equal(environment.bulkQuoteId)"
266
+ ]
267
+ },
268
+ {
269
+ "id": 29,
270
+ "description": "payeefsp request - PayerFsp should be testingtoolkitdfsp",
271
+ "exec": [
272
+ "expect(environment.bulkTransfersNegativeRequest.data.payerFsp).to.equal('testingtoolkitdfsp')"
273
+ ]
274
+ },
275
+ {
276
+ "id": 30,
277
+ "description": "payeefsp request - PayeeFsp should be payeefsp",
278
+ "exec": [
279
+ "expect(environment.bulkTransfersNegativeRequest.data.payeeFsp).to.equal('payeefsp')"
280
+ ]
281
+ },
282
+ {
283
+ "id": 31,
284
+ "description": "payeefsp request - expiration should be set",
285
+ "exec": [
286
+ "expect(environment.bulkTransfersNegativeRequest.data).to.have.property('expiration')"
287
+ ]
288
+ },
289
+ {
290
+ "id": 32,
291
+ "description": "payeefsp request - All individual transfers (prepare) should be sent",
292
+ "exec": [
293
+ "expect(environment.bulkTransfersNegativeRequest.data.individualTransfers.length).to.equal(2)"
294
+ ]
295
+ },
296
+ {
297
+ "id": 33,
298
+ "description": "payeefsp request - 1st individual transfer should have valid ilpPacket",
299
+ "exec": [
300
+ "const transfer1 = environment.bulkTransfersNegativeRequest.data.individualTransfers.find(t => t.transferId === environment.transferId);",
301
+ "expect(transfer1.ilpPacket).to.equal(environment.validIlpPacket2)"
302
+ ]
303
+ },
304
+ {
305
+ "id": 34,
306
+ "description": "payeefsp request - 1st individual transfer should have valid condition",
307
+ "exec": [
308
+ "const transfer1 = environment.bulkTransfersNegativeRequest.data.individualTransfers.find(t => t.transferId === environment.transferId);",
309
+ "expect(transfer1.condition).to.equal(environment.validCondition2)"
310
+ ]
311
+ },
312
+ {
313
+ "id": 35,
314
+ "description": "payeefsp request - 1st individual transfer should have valid transferAmount",
315
+ "exec": [
316
+ "const transfer1 = environment.bulkTransfersNegativeRequest.data.individualTransfers.find(t => t.transferId === environment.transferId);",
317
+ "expect(JSON.stringify(transfer1.transferAmount)).to.equal(JSON.stringify({ amount: \"1\", currency: \"USD\" }))"
318
+ ]
319
+ },
320
+ {
321
+ "id": 36,
322
+ "description": "payeefsp request - 1st individual transfer should have valid extensionList",
323
+ "exec": [
324
+ "const transfer1 = environment.bulkTransfersNegativeRequest.data.individualTransfers.find(t => t.transferId === environment.transferId);",
325
+ "expect(JSON.stringify(transfer1.extensionList)).to.equal(JSON.stringify({ extension: [{key: \"extKey1\", value: \"extValue1\"}, { key: \"extKey2\", value: \"extValue2\" }]}))"
326
+ ]
327
+ },
328
+ {
329
+ "id": 37,
330
+ "description": "payeefsp request - 2nd individual transfer should have valid ilpPacket",
331
+ "exec": [
332
+ "const transfer2 = environment.bulkTransfersNegativeRequest.data.individualTransfers.find(t => t.transferId === environment.transferId);",
333
+ "expect(transfer2.ilpPacket).to.equal(environment.validIlpPacket2)"
334
+ ]
335
+ },
336
+ {
337
+ "id": 38,
338
+ "description": "payeefsp request - 2nd individual transfer should have valid condition",
339
+ "exec": [
340
+ "const transfer2 = environment.bulkTransfersNegativeRequest.data.individualTransfers.find(t => t.transferId === environment.transferId);",
341
+ "expect(transfer2.condition).to.equal(environment.validCondition2)"
342
+ ]
343
+ },
344
+ {
345
+ "id": 39,
346
+ "description": "payeefsp request - 2nd individual transfer should have valid transferAmount",
347
+ "exec": [
348
+ "const transfer2 = environment.bulkTransfersNegativeRequest.data.individualTransfers.find(t => t.transferId === environment.transferId2)",
349
+ "expect(JSON.stringify(transfer2.transferAmount)).to.equal(JSON.stringify({ amount: \"1\", currency: \"USD\" }))"
350
+ ]
351
+ }
352
+ ]
353
+ },
354
+ "ignoreCallbacks": false,
355
+ "params": {
356
+ "name": "testingtoolkitdfsp"
357
+ },
358
+ "path": "/bulkTransfers",
359
+ "scripts": {
360
+ "preRequest": {
361
+ "exec": [
362
+ "const uuid = require('uuid');",
363
+ "",
364
+ "const delay = 1000 * 3600 * 24",
365
+ "const bulkTransferId = uuid.v4();",
366
+ "const bulkQuoteId = uuid.v4();",
367
+ "const transferId = uuid.v4();",
368
+ "const transferId2 = uuid.v4();",
369
+ "const now = new Date();",
370
+ "const headerDate = now.toUTCString();",
371
+ "const expirationDate = new Date(now.getTime() + delay).toISOString();",
372
+ "const completedTimestamp = now.toISOString();",
373
+ "",
374
+ "pm.environment.set(\"bulkTransferId\", bulkTransferId);",
375
+ "pm.environment.set(\"bulkQuoteId\", bulkQuoteId);",
376
+ "pm.environment.set(\"transferId\", transferId);",
377
+ "pm.environment.set(\"transferId2\", transferId2);",
378
+ "pm.environment.set(\"headerDate\", headerDate);",
379
+ "pm.environment.set(\"expirationDate\", expirationDate);",
380
+ "pm.environment.set(\"completedTimestamp\", completedTimestamp);",
381
+ "pm.environment.set(\"amount\", 1);",
382
+ "pm.environment.set(\"amount2\", 1);",
383
+ "pm.environment.set(\"currency2\", \"USD\");"
384
+ ]
385
+ },
386
+ "postRequest": {
387
+ "exec": [
388
+ "setTimeout(function () {",
389
+ " pm.sendRequest(pm.environment.get(\"PAYEEFSP_SDK_TESTAPI_URL\") + \"/callbacks/\" + pm.environment.get(\"bulkTransferId\"), function (err, response) {",
390
+ " pm.environment.set(\"bulkTransfersNegativeCallback\", response.json())",
391
+ " console.log('bulkTransfersNegativeCallback:', response.json())",
392
+ " });",
393
+ " pm.sendRequest(pm.environment.get(\"PAYEEFSP_SDK_TESTAPI_URL\") + \"/requests/\" + pm.environment.get(\"bulkTransferId\"), function (err, response) {",
394
+ " pm.environment.set(\"bulkTransfersNegativeRequest\", response.json())",
395
+ " console.log('bulkTransfersNegativeRequest:', response.json())",
396
+ " });",
397
+ "}, 1000)"
398
+ ]
399
+ }
400
+ }
401
+ },
402
+ {
403
+ "id": 5,
404
+ "description": "GET Bulk Transfer - PayeeFSP",
405
+ "apiVersion": {
406
+ "minorVersion": 0,
407
+ "majorVersion": 1,
408
+ "type": "fspiop",
409
+ "asynchronous": true
410
+ },
411
+ "operationPath": "/bulkTransfers/{ID}",
412
+ "path": "/bulkTransfers/{$environment.bulkTransferId}",
413
+ "method": "get",
414
+ "params": {
415
+ "ID": "{$environment.bulkTransferId}",
416
+ "name": ""
417
+ },
418
+ "url": "{$inputs.HOST_BULK_ADAPTER}",
419
+ "headers": {
420
+ "Accept": "application/vnd.interoperability.transfers+json;version=1",
421
+ "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0",
422
+ "Date": "{$environment.headerDate}",
423
+ "FSPIOP-Source": "payeefsp",
424
+ "FSPIOP-Destination": "switch"
425
+ },
426
+ "tests": {
427
+ "assertions": [
428
+ {
429
+ "id": 1,
430
+ "description": "Status code is 202",
431
+ "exec": [
432
+ "expect(response.status).to.equal(202)"
433
+ ]
434
+ },
435
+ {
436
+ "id": 2,
437
+ "description": "Callback date header should be set",
438
+ "exec": [
439
+ "expect(environment.bulkTransfersNegativeCallback.headers).to.have.property('date')"
440
+ ]
441
+ },
442
+ {
443
+ "id": 3,
444
+ "description": "Callback fspiop-source should be switch",
445
+ "exec": [
446
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('switch')"
447
+ ]
448
+ },
449
+ {
450
+ "id": 4,
451
+ "description": "Callback fspiop-destination should be payeefsp",
452
+ "exec": [
453
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-destination']).to.equal('payeefsp')"
454
+ ]
455
+ },
456
+ {
457
+ "id": 5,
458
+ "description": "Callback fspiop-uri should be as expected",
459
+ "exec": [
460
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-uri']).to.equal(`/payeefsp/bulkTransfers/${environment.bulkTransferId}`)"
461
+ ]
462
+ },
463
+ {
464
+ "id": 6,
465
+ "description": "Callback fspiop-http-method should be PUT",
466
+ "exec": [
467
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-http-method']).to.equal('PUT')"
468
+ ]
469
+ },
470
+ {
471
+ "id": 7,
472
+ "description": "Callback Bulk Transfer state should be COMPLETED on Payee side",
473
+ "exec": [
474
+ "expect(environment.bulkTransfersNegativeCallback.data.bulkTransferState).to.equal('COMPLETED')"
475
+ ]
476
+ },
477
+ {
478
+ "id": 8,
479
+ "description": "Callback Completed timestamp should be set",
480
+ "exec": [
481
+ "expect(environment.bulkTransfersNegativeCallback.data).to.have.property('completedTimestamp')"
482
+ ]
483
+ },
484
+ {
485
+ "id": 9,
486
+ "description": "Callback All individual transfer results (fulfilments) should be returned",
487
+ "exec": [
488
+ "expect(environment.bulkTransfersNegativeCallback.data.individualTransferResults.length).to.equal(2)"
489
+ ]
490
+ },
491
+ {
492
+ "id": 10,
493
+ "description": "Callback 1st individual transfer should have fulfilment",
494
+ "exec": [
495
+ "const transfer1 = environment.bulkTransfersNegativeCallback.data.individualTransferResults.find(t => t.transferId === environment.transferId);",
496
+ "expect(transfer1).to.have.property('fulfilment')"
497
+ ]
498
+ },
499
+ {
500
+ "id": 11,
501
+ "description": "Callback 2nd individual transfer should have fulfilment",
502
+ "exec": [
503
+ "const transfer2 = environment.bulkTransfersNegativeCallback.data.individualTransferResults.find(t => t.transferId === environment.transferId2);",
504
+ "expect(transfer2).to.have.property('fulfilment')"
505
+ ]
506
+ }
507
+ ]
508
+ },
509
+ "ignoreCallbacks": true,
510
+ "scripts": {
511
+ "postRequest": {
512
+ "exec": [
513
+ "setTimeout(function () {",
514
+ " pm.sendRequest(pm.environment.get(\"PAYEEFSP_SDK_TESTAPI_URL\") + \"/callbacks/\" + pm.environment.get(\"bulkTransferId\"), function (err, response) {",
515
+ " pm.environment.set(\"bulkTransfersNegativeCallback\", response.json())",
516
+ " console.log('bulkTransfersNegativeCallback:', response.json())",
517
+ " });",
518
+ "}, 3000)"
519
+ ]
520
+ },
521
+ "preRequest": {
522
+ "exec": [
523
+ ""
524
+ ]
525
+ }
526
+ }
527
+ },
528
+ {
529
+ "id": 6,
530
+ "description": "GET Bulk Transfer - PayerFSP",
531
+ "apiVersion": {
532
+ "minorVersion": 0,
533
+ "majorVersion": 1,
534
+ "type": "fspiop",
535
+ "asynchronous": true
536
+ },
537
+ "operationPath": "/bulkTransfers/{ID}",
538
+ "path": "/bulkTransfers/{$environment.bulkTransferId}",
539
+ "method": "get",
540
+ "params": {
541
+ "ID": "{$environment.bulkTransferId}",
542
+ "name": ""
543
+ },
544
+ "url": "{$inputs.HOST_BULK_ADAPTER}",
545
+ "headers": {
546
+ "Accept": "application/vnd.interoperability.transfers+json;version=1",
547
+ "Content-Type": "application/vnd.interoperability.transfers+json;version=1.0",
548
+ "Date": "{$environment.headerDate}",
549
+ "FSPIOP-Source": "testingtoolkitdfsp",
550
+ "FSPIOP-Destination": "switch"
551
+ },
552
+ "tests": {
553
+ "assertions": [
554
+ {
555
+ "id": 1,
556
+ "description": "Status code is 202",
557
+ "exec": [
558
+ "expect(response.status).to.equal(202)"
559
+ ]
560
+ },
561
+ {
562
+ "id": 2,
563
+ "description": "Callback date header should be set",
564
+ "exec": [
565
+ "expect(callback.headers).to.have.property('date')"
566
+ ]
567
+ },
568
+ {
569
+ "id": 3,
570
+ "description": "Callback fspiop-source should be switch",
571
+ "exec": [
572
+ "expect(callback.headers['fspiop-source']).to.equal('switch')"
573
+ ]
574
+ },
575
+ {
576
+ "id": 4,
577
+ "description": "Callback fspiop-destination should be payerfsp",
578
+ "exec": [
579
+ "expect(callback.headers['fspiop-destination']).to.equal('testingtoolkitdfsp')"
580
+ ]
581
+ },
582
+ {
583
+ "id": 5,
584
+ "description": "Callback fspiop-uri should be as expected",
585
+ "exec": [
586
+ "expect(callback.headers['fspiop-uri']).to.equal(`/testingtoolkitdfsp/bulkTransfers/${environment.bulkTransferId}`)"
587
+ ]
588
+ },
589
+ {
590
+ "id": 6,
591
+ "description": "Callback fspiop-http-method should be PUT",
592
+ "exec": [
593
+ "expect(callback.headers['fspiop-http-method']).to.equal('PUT')"
594
+ ]
595
+ },
596
+ {
597
+ "id": 7,
598
+ "description": "Callback Bulk Transfer state should be COMPLETED on Payer side",
599
+ "exec": [
600
+ "expect(callback.body.bulkTransferState).to.equal('COMPLETED')"
601
+ ]
602
+ },
603
+ {
604
+ "id": 8,
605
+ "description": "Callback Completed timestamp should be set",
606
+ "exec": [
607
+ "expect(callback.body).to.have.property('completedTimestamp')"
608
+ ]
609
+ },
610
+ {
611
+ "id": 9,
612
+ "description": "Callback All individual transfer results (fulfilments) should be returned",
613
+ "exec": [
614
+ "expect(callback.body.individualTransferResults.length).to.equal(2)"
615
+ ]
616
+ },
617
+ {
618
+ "id": 10,
619
+ "description": "Callback 1st individual transfer should have fulfilment",
620
+ "exec": [
621
+ "const transfer1 = callback.body.individualTransferResults.find(t => t.transferId === environment.transferId);",
622
+ "expect(transfer1).to.have.property('fulfilment')"
623
+ ]
624
+ },
625
+ {
626
+ "id": 11,
627
+ "description": "Callback 2nd individual transfer should have fulfilment",
628
+ "exec": [
629
+ "const transfer2 = callback.body.individualTransferResults.find(t => t.transferId === environment.transferId2);",
630
+ "expect(transfer2).to.have.property('fulfilment')"
631
+ ]
632
+ }
633
+ ]
634
+ },
635
+ "ignoreCallbacks": false,
636
+ "scripts": {
637
+ "postRequest": {
638
+ "exec": [
639
+ ""
640
+ ]
641
+ },
642
+ "preRequest": {
643
+ "exec": [
644
+ ""
645
+ ]
646
+ }
647
+ }
648
+ }
649
+ ]
650
+ },
651
+ {
652
+ "id": 2,
653
+ "name": "negative scenario - payee_abort",
654
+ "requests": [
655
+ {
656
+ "id": 1,
657
+ "description": "Store Payerfsp position before prepare",
658
+ "apiVersion": {
659
+ "minorVersion": 3,
660
+ "majorVersion": 9,
661
+ "type": "central_admin"
662
+ },
663
+ "operationPath": "/participants/{name}/positions",
664
+ "path": "/participants/testingtoolkitdfsp/positions",
665
+ "method": "get",
666
+ "params": {
667
+ "name": "testingtoolkitdfsp"
668
+ },
669
+ "url": "{$inputs.HOST_CENTRAL_LEDGER}",
670
+ "tests": {
671
+ "assertions": [
672
+ {
673
+ "id": 1,
674
+ "description": "Status code is 200",
675
+ "exec": [
676
+ "expect(response.status).to.equal(200)"
677
+ ]
678
+ }
679
+ ]
680
+ },
681
+ "scripts": {
682
+ "postRequest": {
683
+ "exec": [
684
+ "pm.environment.set(\"payerfspPositionBeforePrepare\", pm.response.body[0].value);"
685
+ ]
686
+ }
687
+ }
688
+ },
689
+ {
690
+ "id": 2,
691
+ "description": "Store Payeefsp position before prepare",
692
+ "apiVersion": {
693
+ "minorVersion": 3,
694
+ "majorVersion": 9,
695
+ "type": "central_admin"
696
+ },
697
+ "operationPath": "/participants/{name}/positions",
698
+ "path": "/participants/noresponsepayeefsp/positions",
699
+ "method": "get",
700
+ "params": {
701
+ "name": "noresponsepayeefsp"
702
+ },
703
+ "url": "{$inputs.HOST_CENTRAL_LEDGER}",
704
+ "tests": {
705
+ "assertions": [
706
+ {
707
+ "id": 1,
708
+ "description": "Status code is 200",
709
+ "exec": [
710
+ "expect(response.status).to.equal(200)"
711
+ ]
712
+ }
713
+ ]
714
+ },
715
+ "scripts": {
716
+ "postRequest": {
717
+ "exec": [
718
+ "pm.environment.set(\"payeefspPositionBeforePrepare\", pm.response.body[0].value);"
719
+ ]
720
+ }
721
+ }
722
+ },
723
+ {
724
+ "id": 3,
725
+ "description": "Send Prepare",
726
+ "apiVersion": {
727
+ "minorVersion": 0,
728
+ "majorVersion": 1,
729
+ "type": "fspiop",
730
+ "asynchronous": true
731
+ },
732
+ "operationPath": "/bulkTransfers",
733
+ "method": "post",
734
+ "url": "{$inputs.HOST_BULK_ADAPTER}",
735
+ "headers": {
736
+ "Accept": "application/vnd.interoperability.bulkTransfers+json;version=1",
737
+ "Content-Type": "application/vnd.interoperability.bulkTransfers+json;version=1.0",
738
+ "Date": "{$environment.headerDate}",
739
+ "FSPIOP-Source": "testingtoolkitdfsp",
740
+ "FSPIOP-Destination": "noresponsepayeefsp"
741
+ },
742
+ "body": {
743
+ "bulkTransferId": "{$environment.bulkTransferId}",
744
+ "bulkQuoteId": "{$environment.bulkQuoteId}",
745
+ "payeeFsp": "noresponsepayeefsp",
746
+ "payerFsp": "testingtoolkitdfsp",
747
+ "individualTransfers": [
748
+ {
749
+ "transferId": "{$environment.transferId}",
750
+ "transferAmount": {
751
+ "currency": "{$environment.currency}",
752
+ "amount": "{$environment.amount}"
753
+ },
754
+ "ilpPacket": "{$environment.validIlpPacket2}",
755
+ "condition": "{$environment.validCondition2}",
756
+ "extensionList": {
757
+ "extension": [
758
+ {
759
+ "key": "extKey1",
760
+ "value": "extValue1"
761
+ },
762
+ {
763
+ "key": "extKey2",
764
+ "value": "extValue2"
765
+ }
766
+ ]
767
+ }
768
+ },
769
+ {
770
+ "transferId": "{$environment.transferId2}",
771
+ "transferAmount": {
772
+ "currency": "{$environment.currency2}",
773
+ "amount": "{$environment.amount2}"
774
+ },
775
+ "ilpPacket": "{$environment.validIlpPacket2}",
776
+ "condition": "{$environment.validCondition2}"
777
+ }
778
+ ],
779
+ "expiration": "{$environment.expirationDate}"
780
+ },
781
+ "tests": {
782
+ "assertions": [
783
+ {
784
+ "id": 1,
785
+ "description": "Response status to be 202",
786
+ "exec": [
787
+ "expect(response.status).to.equal(202)"
788
+ ]
789
+ }
790
+ ]
791
+ },
792
+ "ignoreCallbacks": true,
793
+ "scripts": {
794
+ "preRequest": {
795
+ "exec": [
796
+ "var uuid = require('uuid');",
797
+ "",
798
+ "const delay = 1000 * 3600 * 24",
799
+ "const bulkTransferId = uuid.v4();",
800
+ "const bulkQuoteId = uuid.v4();",
801
+ "const transferId = uuid.v4();",
802
+ "const transferId2 = uuid.v4();",
803
+ "const now = new Date();",
804
+ "const headerDate = now.toUTCString();",
805
+ "const expirationDate = new Date(now.getTime() + delay).toISOString();",
806
+ "const completedTimestamp = now.toISOString();",
807
+ "const amount = 1;",
808
+ "const amount2 = 2;",
809
+ "pm.environment.set('bulkTransferId', bulkTransferId);",
810
+ "pm.environment.set('bulkQuoteId', bulkQuoteId);",
811
+ "pm.environment.set('transferId', transferId);",
812
+ "pm.environment.set('transferId2', transferId2);",
813
+ "pm.environment.set('headerDate', headerDate);",
814
+ "pm.environment.set('expirationDate', expirationDate);",
815
+ "pm.environment.set('completedTimestamp', completedTimestamp);",
816
+ "pm.environment.set('amount', amount);",
817
+ "pm.environment.set('amount2', amount2);",
818
+ "pm.environment.set('currency2', 'USD');"
819
+ ]
820
+ }
821
+ }
822
+ },
823
+ {
824
+ "id": 4,
825
+ "description": "Store Payerfsp position after Prepare",
826
+ "apiVersion": {
827
+ "minorVersion": 3,
828
+ "majorVersion": 9,
829
+ "type": "central_admin"
830
+ },
831
+ "operationPath": "/participants/{name}/positions",
832
+ "path": "/participants/testingtoolkitdfsp/positions",
833
+ "method": "get",
834
+ "params": {
835
+ "name": "testingtoolkitdfsp"
836
+ },
837
+ "url": "{$inputs.HOST_CENTRAL_LEDGER}",
838
+ "tests": {
839
+ "assertions": [
840
+ {
841
+ "id": 1,
842
+ "description": "Status code is 200",
843
+ "exec": [
844
+ "expect(response.status).to.equal(200)"
845
+ ]
846
+ }
847
+ ]
848
+ },
849
+ "ignoreCallbacks": false,
850
+ "scripts": {
851
+ "postRequest": {
852
+ "exec": [
853
+ "var jsonData = pm.response.body;",
854
+ "pm.environment.set(\"payerfspPositionAfterPrepare\", jsonData[0].value)"
855
+ ]
856
+ },
857
+ "preRequest": {
858
+ "exec": [
859
+ ""
860
+ ]
861
+ }
862
+ }
863
+ },
864
+ {
865
+ "id": 5,
866
+ "description": "GET Bulk Transfer - PayerFSP",
867
+ "apiVersion": {
868
+ "minorVersion": 0,
869
+ "majorVersion": 1,
870
+ "type": "fspiop",
871
+ "asynchronous": true
872
+ },
873
+ "operationPath": "/bulkTransfers/{ID}",
874
+ "path": "/bulkTransfers/{$environment.bulkTransferId}",
875
+ "method": "get",
876
+ "params": {
877
+ "ID": "{$environment.bulkTransferId}",
878
+ "name": ""
879
+ },
880
+ "url": "{$inputs.HOST_BULK_ADAPTER}",
881
+ "headers": {
882
+ "Accept": "application/vnd.interoperability.bulkTransfers+json;version=1",
883
+ "Content-Type": "application/vnd.interoperability.bulkTransfers+json;version=1.0",
884
+ "Date": "{$environment.headerDate}",
885
+ "FSPIOP-Source": "testingtoolkitdfsp",
886
+ "FSPIOP-Destination": "switch"
887
+ },
888
+ "tests": {
889
+ "assertions": [
890
+ {
891
+ "id": 1,
892
+ "description": "Status code is 202",
893
+ "exec": [
894
+ "expect(response.status).to.equal(202)"
895
+ ]
896
+ },
897
+ {
898
+ "id": 2,
899
+ "description": "payerfsp callback - date header should be set",
900
+ "exec": [
901
+ "expect(callback.headers).to.have.property('date')"
902
+ ]
903
+ },
904
+ {
905
+ "id": 3,
906
+ "description": "payerfsp callback - fspiop-source should be switch",
907
+ "exec": [
908
+ "expect(callback.headers['fspiop-source']).to.equal('switch')"
909
+ ]
910
+ },
911
+ {
912
+ "id": 4,
913
+ "description": "payerfsp callback - fspiop-destination should be testingtoolkitdfsp",
914
+ "exec": [
915
+ "expect(callback.headers['fspiop-destination']).to.equal('testingtoolkitdfsp')"
916
+ ]
917
+ },
918
+ {
919
+ "id": 5,
920
+ "description": "payerfsp callback - fspiop-uri should be as expected",
921
+ "exec": [
922
+ "expect(callback.headers['fspiop-uri']).to.equal(`/testingtoolkitdfsp/bulkTransfers/${environment.bulkTransferId}/error`)"
923
+ ]
924
+ },
925
+ {
926
+ "id": 6,
927
+ "description": "payerfsp callback - fspiop-http-method should be PUT",
928
+ "exec": [
929
+ "expect(callback.headers['fspiop-http-method']).to.equal('PUT')"
930
+ ]
931
+ },
932
+ {
933
+ "id": 8,
934
+ "description": "payerfsp callback - errorInformation should be set correctly",
935
+ "exec": [
936
+ "expect(callback.body).to.have.property(\"errorInformation\")",
937
+ "expect(JSON.stringify(callback.body.errorInformation)).to.equal(JSON.stringify({",
938
+ " errorCode: \"5100\",",
939
+ " errorDescription: \"An error occured\"",
940
+ "}))"
941
+ ]
942
+ }
943
+ ]
944
+ },
945
+ "ignoreCallbacks": false,
946
+ "delay": "1000",
947
+ "scripts": {
948
+ "postRequest": {
949
+ "exec": [
950
+ ""
951
+ ]
952
+ },
953
+ "preRequest": {
954
+ "exec": [
955
+ "pm.sendRequest({",
956
+ " url: pm.environment.get(\"HOST_BULK_ADAPTER\")+\"/bulkTransfers/\"+pm.environment.get(\"bulkTransferId\")+\"/error\",",
957
+ " method: \"PUT\",",
958
+ " header: {",
959
+ " \"Content-Type\": \"application/vnd.interoperability.bulkTransfers+json;version=1.0\",",
960
+ " \"Date\": \"Tue, 07 Jul 2020 16:34:24 GMT\",",
961
+ " \"FSPIOP-Source\": \"noresponsepayeefsp\",",
962
+ " \"FSPIOP-Destination\": \"testingtoolkitdfsp\"",
963
+ " },",
964
+ " body: {",
965
+ " mode: 'raw',",
966
+ " raw: JSON.stringify({",
967
+ " \"errorInformation\": {",
968
+ " \"errorCode\": \"5100\",",
969
+ " \"errorDescription\": \"An error occured\"",
970
+ " }",
971
+ " })",
972
+ " }",
973
+ "}, function (err, response) {});",
974
+ "",
975
+ "setTimeout(() => {}, 1000)"
976
+ ]
977
+ }
978
+ }
979
+ },
980
+ {
981
+ "id": 6,
982
+ "description": "GET Bulk Transfer - PayeeFSP",
983
+ "apiVersion": {
984
+ "minorVersion": 0,
985
+ "majorVersion": 1,
986
+ "type": "fspiop",
987
+ "asynchronous": true
988
+ },
989
+ "operationPath": "/bulkTransfers/{ID}",
990
+ "path": "/bulkTransfers/{$environment.bulkTransferId}",
991
+ "method": "get",
992
+ "params": {
993
+ "ID": "{$environment.bulkTransferId}",
994
+ "name": ""
995
+ },
996
+ "url": "{$inputs.HOST_BULK_ADAPTER}",
997
+ "headers": {
998
+ "Accept": "application/vnd.interoperability.bulkTransfers+json;version=1",
999
+ "Content-Type": "application/vnd.interoperability.bulkTransfers+json;version=1.0",
1000
+ "Date": "{$environment.headerDate}",
1001
+ "FSPIOP-Source": "noresponsepayeefsp",
1002
+ "FSPIOP-Destination": "switch"
1003
+ },
1004
+ "tests": {
1005
+ "assertions": [
1006
+ {
1007
+ "id": 1,
1008
+ "description": "Status code is 202",
1009
+ "exec": [
1010
+ "expect(response.status).to.equal(202)"
1011
+ ]
1012
+ },
1013
+ {
1014
+ "id": 10,
1015
+ "description": "payeefsp callback - date header should be set",
1016
+ "exec": [
1017
+ "expect(environment.bulkTransfersNegativeCallback.headers).to.have.property('date')"
1018
+ ]
1019
+ },
1020
+ {
1021
+ "id": 11,
1022
+ "description": "payeefsp callback - fspiop-source should be switch",
1023
+ "exec": [
1024
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('switch')"
1025
+ ]
1026
+ },
1027
+ {
1028
+ "id": 12,
1029
+ "description": "payeefsp callback - fspiop-destination should be payerfsp",
1030
+ "exec": [
1031
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-destination']).to.equal('noresponsepayeefsp')"
1032
+ ]
1033
+ },
1034
+ {
1035
+ "id": 13,
1036
+ "description": "payeefsp callback - fspiop-uri should be as expected",
1037
+ "exec": [
1038
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-uri']).to.equal(`/noresponsepayeefsp/bulkTransfers/${environment.bulkTransferId}/error`)"
1039
+ ]
1040
+ },
1041
+ {
1042
+ "id": 14,
1043
+ "description": "payeefsp callback - fspiop-http-method should be PUT",
1044
+ "exec": [
1045
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-http-method']).to.equal('PUT')"
1046
+ ]
1047
+ },
1048
+ {
1049
+ "id": 15,
1050
+ "description": "payeefsp callback - accept header should be undefined",
1051
+ "exec": [
1052
+ "expect(environment.bulkTransfersNegativeCallback.headers['accept']).to.equal(undefined)"
1053
+ ]
1054
+ },
1055
+ {
1056
+ "id": 16,
1057
+ "description": "payeefsp callback - errorCode to be 5100",
1058
+ "exec": [
1059
+ "expect(environment.bulkTransfersNegativeCallback.data.errorInformation.errorCode).to.equal(\"5100\")"
1060
+ ]
1061
+ },
1062
+ {
1063
+ "id": 17,
1064
+ "description": "payeefsp callback - errorDescription to be 'An error occured'",
1065
+ "exec": [
1066
+ "expect(environment.bulkTransfersNegativeCallback.data.errorInformation.errorDescription).to.equal(\"An error occured\")"
1067
+ ]
1068
+ },
1069
+ {
1070
+ "id": 18,
1071
+ "description": "payeefsp request - date header should be set",
1072
+ "exec": [
1073
+ "expect(environment.bulkTransfersNegativeRequest.headers).to.have.property('date')"
1074
+ ]
1075
+ },
1076
+ {
1077
+ "id": 19,
1078
+ "description": "payeefsp request - fspiop-source should be switch",
1079
+ "exec": [
1080
+ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('testingtoolkitdfsp')"
1081
+ ]
1082
+ },
1083
+ {
1084
+ "id": 20,
1085
+ "description": "payeefsp request - fspiop-destination should be payerfsp",
1086
+ "exec": [
1087
+ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-destination']).to.equal('noresponsepayeefsp')"
1088
+ ]
1089
+ },
1090
+ {
1091
+ "id": 21,
1092
+ "description": "payeefsp request - fspiop-uri should be as expected",
1093
+ "exec": [
1094
+ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-uri']).to.equal('/bulkTransfers')"
1095
+ ]
1096
+ },
1097
+ {
1098
+ "id": 22,
1099
+ "description": "payeefsp request - fspiop-http-method should be POST",
1100
+ "exec": [
1101
+ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-http-method']).to.equal('POST')"
1102
+ ]
1103
+ },
1104
+ {
1105
+ "id": 23,
1106
+ "description": "payeefsp request - accept header should be application/vnd.interoperability.bulkTransfers+json;version=1",
1107
+ "exec": [
1108
+ "expect(environment.bulkTransfersNegativeRequest.headers['accept']).to.equal('application/vnd.interoperability.bulkTransfers+json;version=1')"
1109
+ ]
1110
+ },
1111
+ {
1112
+ "id": 24,
1113
+ "description": "payeefsp request - request body should be sent correctly",
1114
+ "exec": [
1115
+ "expect(environment.bulkTransfersNegativeRequest.data.bulkTransferId).to.equal(environment.bulkTransferId)",
1116
+ "expect(environment.bulkTransfersNegativeRequest.data.bulkQuoteId).to.equal(environment.bulkQuoteId)",
1117
+ "expect(environment.bulkTransfersNegativeRequest.data.payeeFsp).to.equal(\"noresponsepayeefsp\")",
1118
+ "expect(environment.bulkTransfersNegativeRequest.data.payerFsp).to.equal(\"testingtoolkitdfsp\")",
1119
+ "expect(environment.bulkTransfersNegativeRequest.data.individualTransfers.length).to.equal(2)",
1120
+ "",
1121
+ "const data = environment.bulkTransfersNegativeRequest.data",
1122
+ "",
1123
+ "const transfer1 = data.individualTransfers.find(t => t.extensionList !== undefined )",
1124
+ "",
1125
+ "expect(transfer1).to.have.property(\"transferId\", environment.transferId)",
1126
+ "expect(JSON.stringify(transfer1.transferAmount)).to.equal(JSON.stringify({ amount: \"1\", currency: \"USD\" }))",
1127
+ "expect(transfer1).to.have.property(\"ilpPacket\", environment.validIlpPacket2)",
1128
+ "expect(transfer1).to.have.property(\"condition\", environment.validCondition2)",
1129
+ "expect(JSON.stringify(transfer1.extensionList)).to.equal(JSON.stringify({ extension: [{key: \"extKey1\", value: \"extValue1\"}, { key: \"extKey2\", value: \"extValue2\" }]}))",
1130
+ " ",
1131
+ "const transfer2 = data.individualTransfers.find(t => t.extensionList === undefined )",
1132
+ "",
1133
+ "expect(transfer2).to.have.property(\"transferId\", environment.transferId2)",
1134
+ "expect(JSON.stringify(transfer2.transferAmount)).to.equal(JSON.stringify({ amount: \"2\", currency: \"USD\" }))",
1135
+ "expect(transfer2).to.have.property(\"ilpPacket\", environment.validIlpPacket2)",
1136
+ "expect(transfer2).to.have.property(\"condition\", environment.validCondition2)",
1137
+ ""
1138
+ ]
1139
+ }
1140
+ ]
1141
+ },
1142
+ "ignoreCallbacks": true,
1143
+ "delay": "3000",
1144
+ "scripts": {
1145
+ "postRequest": {
1146
+ "exec": [
1147
+ "setTimeout(function () {",
1148
+ " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\") + \"/bulkTransfersNegative/callbacks/\" + pm.environment.get(\"bulkTransferId\"), function (err, response) {",
1149
+ " pm.environment.set(\"bulkTransfersNegativeCallback\", response.json())",
1150
+ " console.log('bulkTransfersNegativeCallback:', response.json())",
1151
+ " });",
1152
+ " pm.sendRequest(pm.environment.get(\"HOST_SIMULATOR\") + \"/bulkTransfersNegative/requests/\" + pm.environment.get(\"bulkTransferId\"), function (err, response) {",
1153
+ " pm.environment.set(\"bulkTransfersNegativeRequest\", response.json())",
1154
+ " console.log('bulkTransfersNegativeRequest:', response.json())",
1155
+ " });",
1156
+ "}, 3000)"
1157
+ ]
1158
+ },
1159
+ "preRequest": {
1160
+ "exec": [
1161
+ ""
1162
+ ]
1163
+ }
1164
+ }
1165
+ },
1166
+ {
1167
+ "id": 7,
1168
+ "description": "Check Payerfsp position after Abort",
1169
+ "apiVersion": {
1170
+ "minorVersion": 3,
1171
+ "majorVersion": 9,
1172
+ "type": "central_admin"
1173
+ },
1174
+ "operationPath": "/participants/{name}/positions",
1175
+ "path": "/participants/testingtoolkitdfsp/positions",
1176
+ "method": "get",
1177
+ "params": {
1178
+ "name": "testingtoolkitdfsp"
1179
+ },
1180
+ "url": "{$inputs.HOST_CENTRAL_LEDGER}",
1181
+ "tests": {
1182
+ "assertions": [
1183
+ {
1184
+ "id": 1,
1185
+ "description": "Status code is 200",
1186
+ "exec": [
1187
+ "expect(response.status).to.equal(200)"
1188
+ ]
1189
+ },
1190
+ {
1191
+ "id": 2,
1192
+ "description": "Payerfsp position after Payer ABORT should be same as position before prepare.",
1193
+ "exec": [
1194
+ "expect(response.body[0].value).to.equal(+environment.payerfspPositionBeforePrepare)"
1195
+ ]
1196
+ }
1197
+ ]
1198
+ }
1199
+ },
1200
+ {
1201
+ "id": 8,
1202
+ "description": "Check Payeefsp position after Abort",
1203
+ "apiVersion": {
1204
+ "minorVersion": 3,
1205
+ "majorVersion": 9,
1206
+ "type": "central_admin"
1207
+ },
1208
+ "operationPath": "/participants/{name}/positions",
1209
+ "path": "/participants/noresponsepayeefsp/positions",
1210
+ "method": "get",
1211
+ "params": {
1212
+ "name": "noresponsepayeefsp"
1213
+ },
1214
+ "url": "{$inputs.HOST_CENTRAL_LEDGER}",
1215
+ "tests": {
1216
+ "assertions": [
1217
+ {
1218
+ "id": 1,
1219
+ "description": "Status code is 200",
1220
+ "exec": [
1221
+ "expect(response.status).to.equal(200)"
1222
+ ]
1223
+ },
1224
+ {
1225
+ "id": 2,
1226
+ "description": "Payeefsp position after Payee ABORT should be same as position before prepare.",
1227
+ "exec": [
1228
+ "expect(response.body[0].value).to.equal(+environment.payeefspPositionBeforePrepare)"
1229
+ ]
1230
+ }
1231
+ ]
1232
+ }
1233
+ }
1234
+ ]
1235
+ },
1236
+ {
1237
+ "id": 3,
1238
+ "name": "negative scenario - partial fulfil",
1239
+ "requests": [
1240
+ {
1241
+ "id": 3,
1242
+ "description": "Send Prepare",
1243
+ "apiVersion": {
1244
+ "minorVersion": 0,
1245
+ "majorVersion": 1,
1246
+ "type": "fspiop",
1247
+ "asynchronous": true
1248
+ },
1249
+ "operationPath": "/bulkTransfers",
1250
+ "method": "post",
1251
+ "url": "{$inputs.HOST_BULK_ADAPTER}",
1252
+ "headers": {
1253
+ "Accept": "application/vnd.interoperability.bulkTransfers+json;version=1",
1254
+ "Content-Type": "application/vnd.interoperability.bulkTransfers+json;version=1.0",
1255
+ "Date": "{$environment.headerDate}",
1256
+ "FSPIOP-Source": "testingtoolkitdfsp",
1257
+ "FSPIOP-Destination": "payeefsp"
1258
+ },
1259
+ "body": {
1260
+ "bulkTransferId": "{$environment.bulkTransferId}",
1261
+ "bulkQuoteId": "{$environment.bulkQuoteId}",
1262
+ "payeeFsp": "payeefsp",
1263
+ "payerFsp": "testingtoolkitdfsp",
1264
+ "individualTransfers": [
1265
+ {
1266
+ "transferId": "{$environment.transferId}",
1267
+ "transferAmount": {
1268
+ "currency": "{$environment.currency}",
1269
+ "amount": "{$environment.amount}"
1270
+ },
1271
+ "ilpPacket": "{$environment.validIlpPacket2}",
1272
+ "condition": "{$environment.validCondition2}",
1273
+ "extensionList": {
1274
+ "extension": [
1275
+ {
1276
+ "key": "extKey1",
1277
+ "value": "extValue1"
1278
+ },
1279
+ {
1280
+ "key": "extKey2",
1281
+ "value": "extValue2"
1282
+ }
1283
+ ]
1284
+ }
1285
+ },
1286
+ {
1287
+ "transferId": "{$environment.transferId2}",
1288
+ "transferAmount": {
1289
+ "currency": "AED",
1290
+ "amount": "{$environment.amount2}"
1291
+ },
1292
+ "ilpPacket": "{$environment.validIlpPacket2}",
1293
+ "condition": "{$environment.validCondition2}"
1294
+ }
1295
+ ],
1296
+ "expiration": "{$environment.expirationDate}"
1297
+ },
1298
+ "tests": {
1299
+ "assertions": [
1300
+ {
1301
+ "id": 1,
1302
+ "description": "Status code is 202",
1303
+ "exec": [
1304
+ "expect(response.status).to.equal(202)"
1305
+ ]
1306
+ },
1307
+ {
1308
+ "id": 2,
1309
+ "description": "payer callback date header should be set",
1310
+ "exec": [
1311
+ "expect(callback.headers).to.have.property('date')"
1312
+ ]
1313
+ },
1314
+ {
1315
+ "id": 3,
1316
+ "description": "payer callback fspiop-source should be payeefsp",
1317
+ "exec": [
1318
+ "expect(callback.headers['fspiop-source']).to.equal('payeefsp')"
1319
+ ]
1320
+ },
1321
+ {
1322
+ "id": 4,
1323
+ "description": "payer callback fspiop-destination should be testingtoolkitdfsp",
1324
+ "exec": [
1325
+ "expect(callback.headers['fspiop-destination']).to.equal('testingtoolkitdfsp')"
1326
+ ]
1327
+ },
1328
+ {
1329
+ "id": 5,
1330
+ "description": "payer callback fspiop-http-method should be PUT",
1331
+ "exec": [
1332
+ "expect(callback.headers['fspiop-http-method']).to.equal('PUT')"
1333
+ ]
1334
+ },
1335
+ {
1336
+ "id": 6,
1337
+ "description": "payer callback fspiop-uri should be as expected",
1338
+ "exec": [
1339
+ "expect(callback.headers['fspiop-uri']).to.equal(`/testingtoolkitdfsp/bulkTransfers/${environment.bulkTransferId}`)"
1340
+ ]
1341
+ },
1342
+ {
1343
+ "id": 7,
1344
+ "description": "payer callback Bulk Transfer state should be COMPLETED on Payer side",
1345
+ "exec": [
1346
+ "expect(callback.body.bulkTransferState).to.equal('COMPLETED')"
1347
+ ]
1348
+ },
1349
+ {
1350
+ "id": 8,
1351
+ "description": "payer callback Completed timestamp should be set",
1352
+ "exec": [
1353
+ "expect(callback.body).to.have.property('completedTimestamp')"
1354
+ ]
1355
+ },
1356
+ {
1357
+ "id": 9,
1358
+ "description": "payer callback All individual transfer results (failed & successful) should be returned",
1359
+ "exec": [
1360
+ "expect(callback.body.individualTransferResults.length).to.equal(2)"
1361
+ ]
1362
+ },
1363
+ {
1364
+ "id": 10,
1365
+ "description": "payer callback One individual transfer result should contain successful transfer fulfilment",
1366
+ "exec": [
1367
+ "const successTransfer = callback.body.individualTransferResults.find(t => t.transferId === environment.transferId)",
1368
+ "expect(successTransfer).to.have.property('transferId')",
1369
+ "expect(successTransfer).to.have.property('fulfilment')"
1370
+ ]
1371
+ },
1372
+ {
1373
+ "id": 11,
1374
+ "description": "payer callback One individual transfer result should contain errorInformation",
1375
+ "exec": [
1376
+ "const failedTransfer = callback.body.individualTransferResults.find(t => t.transferId === environment.transferId2)",
1377
+ "expect(failedTransfer.errorInformation.errorCode).to.equal('3100')",
1378
+ "expect(failedTransfer.errorInformation.errorDescription).to.equal('Generic validation error - Participant testingtoolkitdfsp AED account not found')"
1379
+ ]
1380
+ },
1381
+ {
1382
+ "id": 12,
1383
+ "description": "payee callback - date header should be set",
1384
+ "exec": [
1385
+ "expect(environment.bulkTransfersNegativeCallback.headers).to.have.property('date')"
1386
+ ]
1387
+ },
1388
+ {
1389
+ "id": 13,
1390
+ "description": "payee callback - fspiop-source should be switch",
1391
+ "exec": [
1392
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('switch')"
1393
+ ]
1394
+ },
1395
+ {
1396
+ "id": 14,
1397
+ "description": "payee callback - fspiop-destination should be payeefsp",
1398
+ "exec": [
1399
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-destination']).to.equal('payeefsp')"
1400
+ ]
1401
+ },
1402
+ {
1403
+ "id": 15,
1404
+ "description": "payee callback - fspiop-uri should be as expected",
1405
+ "exec": [
1406
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-uri']).to.equal(`/payeefsp/bulkTransfers/${environment.bulkTransferId}`)"
1407
+ ]
1408
+ },
1409
+ {
1410
+ "id": 16,
1411
+ "description": "payee callback - fspiop-http-method should be PUT",
1412
+ "exec": [
1413
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-http-method']).to.equal('PUT')"
1414
+ ]
1415
+ },
1416
+ {
1417
+ "id": 17,
1418
+ "description": "payee callback - Bulk Transfer state should be COMPLETED on Payee side",
1419
+ "exec": [
1420
+ "expect(environment.bulkTransfersNegativeCallback.data.bulkTransferState).to.equal('COMPLETED')"
1421
+ ]
1422
+ },
1423
+ {
1424
+ "id": 18,
1425
+ "description": "payee callback - Completed timestamp should be set",
1426
+ "exec": [
1427
+ "expect(environment.bulkTransfersNegativeCallback.data).to.have.property('completedTimestamp')"
1428
+ ]
1429
+ },
1430
+ {
1431
+ "id": 19,
1432
+ "description": "payee callback - Only one (1) individual transfer result (fulfilments) should be returned",
1433
+ "exec": [
1434
+ "expect(environment.bulkTransfersNegativeCallback.data.individualTransferResults.length).to.equal(1)"
1435
+ ]
1436
+ },
1437
+ {
1438
+ "id": 20,
1439
+ "description": "payee callback - Individual transfer result should have transferId",
1440
+ "exec": [
1441
+ "expect(environment.bulkTransfersNegativeCallback.data.individualTransferResults[0]).to.have.property('transferId')"
1442
+ ]
1443
+ },
1444
+ {
1445
+ "id": 21,
1446
+ "description": "payee callback Individual transfer result should have fulfilment",
1447
+ "exec": [
1448
+ "expect(environment.bulkTransfersNegativeCallback.data.individualTransferResults[0]).to.have.property('fulfilment')"
1449
+ ]
1450
+ },
1451
+ {
1452
+ "id": 22,
1453
+ "description": "request to payee - date header should be set",
1454
+ "exec": [
1455
+ "expect(environment.bulkTransfersNegativeRequest.headers).to.have.property('date')"
1456
+ ]
1457
+ },
1458
+ {
1459
+ "id": 23,
1460
+ "description": "request to payee - fspiop-source should be testingtoolkitdfsp",
1461
+ "exec": [
1462
+ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-source']).to.equal('testingtoolkitdfsp')"
1463
+ ]
1464
+ },
1465
+ {
1466
+ "id": 24,
1467
+ "description": "request to payee - fspiop-destination should be payeefsp",
1468
+ "exec": [
1469
+ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-destination']).to.equal('payeefsp')"
1470
+ ]
1471
+ },
1472
+ {
1473
+ "id": 25,
1474
+ "description": "request to payee - fspiop-uri should be as expected",
1475
+ "exec": [
1476
+ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-uri']).to.equal('/bulkTransfers')"
1477
+ ]
1478
+ },
1479
+ {
1480
+ "id": 26,
1481
+ "description": "request to payee - fspiop-http-method should be POST",
1482
+ "exec": [
1483
+ "expect(environment.bulkTransfersNegativeRequest.headers['fspiop-http-method']).to.equal('POST')"
1484
+ ]
1485
+ },
1486
+ {
1487
+ "id": 27,
1488
+ "description": "request to payee - Bulk transfer Id should be set",
1489
+ "exec": [
1490
+ "expect(environment.bulkTransfersNegativeRequest.data.bulkTransferId).to.equal(environment.bulkTransferId)"
1491
+ ]
1492
+ },
1493
+ {
1494
+ "id": 28,
1495
+ "description": "request to payee - Bulk quote Id should be set",
1496
+ "exec": [
1497
+ "expect(environment.bulkTransfersNegativeRequest.data.bulkQuoteId).to.equal(environment.bulkQuoteId)"
1498
+ ]
1499
+ },
1500
+ {
1501
+ "id": 29,
1502
+ "description": "request to payee - PayerFsp should be testingtoolkitdfsp",
1503
+ "exec": [
1504
+ "expect(environment.bulkTransfersNegativeRequest.data.payerFsp).to.equal('testingtoolkitdfsp')"
1505
+ ]
1506
+ },
1507
+ {
1508
+ "id": 30,
1509
+ "description": "request to payee - PayeeFsp should be payeefsp",
1510
+ "exec": [
1511
+ "expect(environment.bulkTransfersNegativeRequest.data.payeeFsp).to.equal('payeefsp')"
1512
+ ]
1513
+ },
1514
+ {
1515
+ "id": 31,
1516
+ "description": "request to payee - expiration should be set",
1517
+ "exec": [
1518
+ "expect(environment.bulkTransfersNegativeRequest.data).to.have.property('expiration')"
1519
+ ]
1520
+ },
1521
+ {
1522
+ "id": 32,
1523
+ "description": "request to payee - Individual transfers (prepare) should be one (1)",
1524
+ "exec": [
1525
+ "expect(environment.bulkTransfersNegativeRequest.data.individualTransfers.length).to.equal(1)"
1526
+ ]
1527
+ },
1528
+ {
1529
+ "id": 33,
1530
+ "description": "request to payee - Individual transfer should have transferId",
1531
+ "exec": [
1532
+ "expect(environment.bulkTransfersNegativeRequest.data.individualTransfers[0]).to.have.property('transferId')"
1533
+ ]
1534
+ },
1535
+ {
1536
+ "id": 34,
1537
+ "description": "request to payee - Individual transfer should have ilpPacket",
1538
+ "exec": [
1539
+ "expect(environment.bulkTransfersNegativeRequest.data.individualTransfers[0]).to.have.property('ilpPacket')"
1540
+ ]
1541
+ },
1542
+ {
1543
+ "id": 35,
1544
+ "description": "request to payee - Individual transfer should have condition",
1545
+ "exec": [
1546
+ "expect(environment.bulkTransfersNegativeRequest.data.individualTransfers[0]).to.have.property('condition')"
1547
+ ]
1548
+ }
1549
+ ]
1550
+ },
1551
+ "ignoreCallbacks": false,
1552
+ "params": {
1553
+ "name": "testingtoolkitdfsp"
1554
+ },
1555
+ "path": "/bulkTransfers",
1556
+ "scripts": {
1557
+ "preRequest": {
1558
+ "exec": [
1559
+ "var uuid = require('uuid');",
1560
+ "",
1561
+ "const delay = 1000 * 3600 * 24",
1562
+ "const bulkTransferId = uuid.v4();",
1563
+ "const bulkQuoteId = uuid.v4();",
1564
+ "const transferId = uuid.v4();",
1565
+ "const transferId2 = uuid.v4();",
1566
+ "const now = new Date();",
1567
+ "const headerDate = now.toUTCString();",
1568
+ "const expirationDate = new Date(now.getTime() + delay).toISOString();",
1569
+ "const completedTimestamp = now.toISOString();",
1570
+ "const amount = 1;",
1571
+ "const amount2 = 2;",
1572
+ "pm.environment.set('bulkTransferId', bulkTransferId);",
1573
+ "pm.environment.set('bulkQuoteId', bulkQuoteId);",
1574
+ "pm.environment.set('transferId', transferId);",
1575
+ "pm.environment.set('transferId2', transferId2);",
1576
+ "pm.environment.set('headerDate', headerDate);",
1577
+ "pm.environment.set('expirationDate', expirationDate);",
1578
+ "pm.environment.set('completedTimestamp', completedTimestamp);",
1579
+ "pm.environment.set('amount', amount);",
1580
+ "pm.environment.set('amount2', amount2);",
1581
+ "pm.environment.set('currency2', 'USD');"
1582
+ ]
1583
+ },
1584
+ "postRequest": {
1585
+ "exec": [
1586
+ "setTimeout(function () {",
1587
+ " pm.sendRequest(pm.environment.get(\"PAYEEFSP_SDK_TESTAPI_URL\") + \"/callbacks/\" + pm.environment.get(\"bulkTransferId\"), function (err, response) {",
1588
+ " pm.environment.set(\"bulkTransfersNegativeCallback\", response.json())",
1589
+ " console.log('bulkTransfersNegativeCallback:', response.json())",
1590
+ " });",
1591
+ " pm.sendRequest(pm.environment.get(\"PAYEEFSP_SDK_TESTAPI_URL\") + \"/requests/\" + pm.environment.get(\"bulkTransferId\"), function (err, response) {",
1592
+ " pm.environment.set(\"bulkTransfersNegativeRequest\", response.json())",
1593
+ " console.log('bulkTransfersNegativeRequest:', response.json())",
1594
+ " });",
1595
+ "}, 1000)"
1596
+ ]
1597
+ }
1598
+ }
1599
+ },
1600
+ {
1601
+ "id": 5,
1602
+ "description": "GET Bulk Transfer - PayeeFSP",
1603
+ "apiVersion": {
1604
+ "minorVersion": 0,
1605
+ "majorVersion": 1,
1606
+ "type": "fspiop",
1607
+ "asynchronous": true
1608
+ },
1609
+ "operationPath": "/bulkTransfers/{ID}",
1610
+ "path": "/bulkTransfers/{$environment.bulkTransferId}",
1611
+ "method": "get",
1612
+ "params": {
1613
+ "ID": "{$environment.bulkTransferId}",
1614
+ "name": ""
1615
+ },
1616
+ "url": "{$inputs.HOST_BULK_ADAPTER}",
1617
+ "headers": {
1618
+ "Accept": "application/vnd.interoperability.bulkTransfers+json;version=1",
1619
+ "Content-Type": "application/vnd.interoperability.bulkTransfers+json;version=1.0",
1620
+ "Date": "{$environment.headerDate}",
1621
+ "FSPIOP-Source": "payeefsp",
1622
+ "FSPIOP-Destination": "switch"
1623
+ },
1624
+ "tests": {
1625
+ "assertions": [
1626
+ {
1627
+ "id": 1,
1628
+ "description": "Status code is 202",
1629
+ "exec": [
1630
+ "expect(response.status).to.equal(202)"
1631
+ ]
1632
+ },
1633
+ {
1634
+ "id": 2,
1635
+ "description": "Callback - date header should be set",
1636
+ "exec": [
1637
+ "expect(environment.bulkTransfersNegativeCallback.headers).to.have.property('date')"
1638
+ ]
1639
+ },
1640
+ {
1641
+ "id": 3,
1642
+ "description": "Callback - fspiop-source should be switch",
1643
+ "exec": [
1644
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-source']).to.equal('switch')"
1645
+ ]
1646
+ },
1647
+ {
1648
+ "id": 4,
1649
+ "description": "Callback - fspiop-destination should be payeefsp",
1650
+ "exec": [
1651
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-destination']).to.equal('payeefsp')"
1652
+ ]
1653
+ },
1654
+ {
1655
+ "id": 5,
1656
+ "description": "Callback - fspiop-uri should be as expected",
1657
+ "exec": [
1658
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-uri']).to.equal(`/payeefsp/bulkTransfers/${environment.bulkTransferId}`)"
1659
+ ]
1660
+ },
1661
+ {
1662
+ "id": 6,
1663
+ "description": "Callback - fspiop-http-method should be PUT",
1664
+ "exec": [
1665
+ "expect(environment.bulkTransfersNegativeCallback.headers['fspiop-http-method']).to.equal('PUT')"
1666
+ ]
1667
+ },
1668
+ {
1669
+ "id": 7,
1670
+ "description": "Callback - Bulk Transfer state should be COMPLETED on Payee side",
1671
+ "exec": [
1672
+ "expect(environment.bulkTransfersNegativeCallback.data.bulkTransferState).to.equal('COMPLETED')"
1673
+ ]
1674
+ },
1675
+ {
1676
+ "id": 8,
1677
+ "description": "Callback - Completed timestamp should be set",
1678
+ "exec": [
1679
+ "expect(environment.bulkTransfersNegativeCallback.data).to.have.property('completedTimestamp')"
1680
+ ]
1681
+ },
1682
+ {
1683
+ "id": 9,
1684
+ "description": "Callback - Only one (1) individual transfer result (fulfilments) should be returned",
1685
+ "exec": [
1686
+ "expect(environment.bulkTransfersNegativeCallback.data.individualTransferResults.length).to.equal(1)"
1687
+ ]
1688
+ },
1689
+ {
1690
+ "id": 10,
1691
+ "description": "Callback - Individual transfer result should have transferId",
1692
+ "exec": [
1693
+ "expect(environment.bulkTransfersNegativeCallback.data.individualTransferResults[0]).to.have.property('transferId')"
1694
+ ]
1695
+ },
1696
+ {
1697
+ "id": 11,
1698
+ "description": "Callback - Individual transfer result should have fulfilment",
1699
+ "exec": [
1700
+ "expect(environment.bulkTransfersNegativeCallback.data.individualTransferResults[0]).to.have.property('fulfilment')"
1701
+ ]
1702
+ }
1703
+ ]
1704
+ },
1705
+ "ignoreCallbacks": true,
1706
+ "scripts": {
1707
+ "postRequest": {
1708
+ "exec": [
1709
+ "setTimeout(function () {",
1710
+ " pm.sendRequest(pm.environment.get(\"PAYEEFSP_SDK_TESTAPI_URL\") + \"/callbacks/\" + pm.environment.get(\"bulkTransferId\"), function (err, response) {",
1711
+ " pm.environment.set(\"bulkTransfersNegativeCallback\", response.json())",
1712
+ " console.log('bulkTransfersNegativeCallback:', response.json())",
1713
+ " });",
1714
+ "}, 3000)"
1715
+ ]
1716
+ },
1717
+ "preRequest": {
1718
+ "exec": [
1719
+ ""
1720
+ ]
1721
+ }
1722
+ }
1723
+ },
1724
+ {
1725
+ "id": 6,
1726
+ "description": "GET Bulk Transfer - PayerFSP",
1727
+ "apiVersion": {
1728
+ "minorVersion": 0,
1729
+ "majorVersion": 1,
1730
+ "type": "fspiop",
1731
+ "asynchronous": true
1732
+ },
1733
+ "operationPath": "/bulkTransfers/{ID}",
1734
+ "path": "/bulkTransfers/{$environment.bulkTransferId}",
1735
+ "method": "get",
1736
+ "params": {
1737
+ "ID": "{$environment.bulkTransferId}",
1738
+ "name": ""
1739
+ },
1740
+ "url": "{$inputs.HOST_BULK_ADAPTER}",
1741
+ "headers": {
1742
+ "Accept": "application/vnd.interoperability.bulkTransfers+json;version=1",
1743
+ "Content-Type": "application/vnd.interoperability.bulkTransfers+json;version=1.0",
1744
+ "Date": "{$environment.headerDate}",
1745
+ "FSPIOP-Source": "testingtoolkitdfsp",
1746
+ "FSPIOP-Destination": "switch"
1747
+ },
1748
+ "tests": {
1749
+ "assertions": [
1750
+ {
1751
+ "id": 1,
1752
+ "description": "Status code is 202",
1753
+ "exec": [
1754
+ "expect(response.status).to.equal(202)"
1755
+ ]
1756
+ },
1757
+ {
1758
+ "id": 2,
1759
+ "description": "Callback - date header should be set",
1760
+ "exec": [
1761
+ "expect(callback.headers).to.have.property('date')"
1762
+ ]
1763
+ },
1764
+ {
1765
+ "id": 3,
1766
+ "description": "Callback - fspiop-source should be switch",
1767
+ "exec": [
1768
+ "expect(callback.headers['fspiop-source']).to.equal('switch')"
1769
+ ]
1770
+ },
1771
+ {
1772
+ "id": 4,
1773
+ "description": "Callback - fspiop-destination should be testingtoolkitdfsp",
1774
+ "exec": [
1775
+ "expect(callback.headers['fspiop-destination']).to.equal('testingtoolkitdfsp')"
1776
+ ]
1777
+ },
1778
+ {
1779
+ "id": 5,
1780
+ "description": "Callback - fspiop-uri should be as expected",
1781
+ "exec": [
1782
+ "expect(callback.headers['fspiop-uri']).to.equal(`/testingtoolkitdfsp/bulkTransfers/${environment.bulkTransferId}`)"
1783
+ ]
1784
+ },
1785
+ {
1786
+ "id": 6,
1787
+ "description": "Callback - fspiop-http-method should be PUT",
1788
+ "exec": [
1789
+ "expect(callback.headers['fspiop-http-method']).to.equal('PUT')"
1790
+ ]
1791
+ },
1792
+ {
1793
+ "id": 7,
1794
+ "description": "Callback - Bulk Transfer state should be COMPLETED on Payer side",
1795
+ "exec": [
1796
+ "expect(callback.body.bulkTransferState).to.equal('COMPLETED')"
1797
+ ]
1798
+ },
1799
+ {
1800
+ "id": 8,
1801
+ "description": "Callback - Completed timestamp should be set",
1802
+ "exec": [
1803
+ "expect(callback.body).to.have.property('completedTimestamp')"
1804
+ ]
1805
+ },
1806
+ {
1807
+ "id": 9,
1808
+ "description": "Callback - All individual transfer results (fulfilments) should be returned",
1809
+ "exec": [
1810
+ "expect(callback.body.individualTransferResults.length).to.equal(2)"
1811
+ ]
1812
+ },
1813
+ {
1814
+ "id": 10,
1815
+ "description": "Callback - 1st individual transfer should have fulfilment",
1816
+ "exec": [
1817
+ "const transfer1 = callback.body.individualTransferResults.find(t => t.transferId === environment.transferId);",
1818
+ "expect(transfer1).to.have.property('fulfilment')"
1819
+ ]
1820
+ },
1821
+ {
1822
+ "id": 11,
1823
+ "description": "Callback - 2nd individual transfer should not have fulfilment",
1824
+ "exec": [
1825
+ "const transfer2 = callback.body.individualTransferResults.find(t => t.transferId === environment.transferId2);",
1826
+ "expect(transfer2).to.not.have.property('fulfilment')"
1827
+ ]
1828
+ },
1829
+ {
1830
+ "id": 12,
1831
+ "description": "Callback - 2nd individual transfer should contain valid error information",
1832
+ "exec": [
1833
+ "const transfer2 = callback.body.individualTransferResults.find(t => t.transferId === environment.transferId2);",
1834
+ "expect(transfer2.errorInformation.errorCode).to.eql(\"3100\");",
1835
+ "expect(transfer2.errorInformation.errorDescription).to.eql(\"Generic validation error - Participant testingtoolkitdfsp AED account not found\");"
1836
+ ]
1837
+ }
1838
+ ]
1839
+ },
1840
+ "ignoreCallbacks": false,
1841
+ "scripts": {
1842
+ "postRequest": {
1843
+ "exec": [
1844
+ ""
1845
+ ]
1846
+ },
1847
+ "preRequest": {
1848
+ "exec": [
1849
+ ""
1850
+ ]
1851
+ }
1852
+ }
1853
+ }
1854
+ ]
1855
+ }
1856
+ ]
1857
+ }