Skip to content

Commit

Permalink
Negative Test Scenarios for subscenario (#107)
Browse files Browse the repository at this point in the history
test case for 400
  • Loading branch information
sri-miriyala authored Jan 18, 2023
1 parent 7dc6fe8 commit 42e10b2
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions collections/hub/other_tests/sdk_tests/subscenario.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,69 @@
}
}
]
},
{
"id": 3,
"name": "Invalid value in subscenario should trigger a 400-Bad Request response.",
"fileInfo": {
"path": "testing-toolkit-test-cases/collections/hub/other_tests/sdk_tests/subscenario.json"
},
"meta": {
"info": "Invalid value in subscenario should trigger a 400-Bad Request response."
},
"requests": [
{
"id": 1,
"description": "POST /transfers",
"apiVersion": {
"minorVersion": 0,
"majorVersion": 1,
"type": "scheme_adapter_outbound",
"asynchronous": true,
"prefix": "/sdk-out",
"hostnames": [],
"specFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/api_spec.yaml",
"callbackMapFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/callback_map.json",
"responseMapFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/response_map.json",
"jsfRefFile": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/mockRef.json",
"triggerTemplatesFolder": "spec_files/api_definitions/mojaloop_sdk_outbound_scheme_adapter_1.0/trigger_templates"
},
"operationPath": "/transfers",
"path": "/transfers",
"method": "post",
"body": {
"from": {
"displayName": "{$inputs.TTKSIM2_MSISDN_1_FIRST_NAME}",
"idType": "MSISDN",
"idValue": "{$inputs.TTKSIM1_MSISDN_1}"
},
"to": {
"idType": "MSISDN",
"idValue": "{$inputs.TTKSIM2_MSISDN_1}"
},
"amountType": "SEND",
"currency": "{$inputs.TTKSIM1_CURRENCY}",
"amount": "10",
"transactionType": "TRANSFER",
"subScenario": "SUBSCENARIOSUBSCENARIOSUBSCENARIO",
"initiatorType": "CONSUMER",
"note": "test payment",
"homeTransactionId": "123ABC"
},
"scriptingEngine": "javascript",
"tests": {
"assertions": [
{
"id": 1,
"description": "statusCode is 400",
"exec": [
"expect(response.status).to.equal(400)"
]
}
]
}
}
]
}
]
}

0 comments on commit 42e10b2

Please sign in to comment.