Skip to content

Commit

Permalink
Refapp-1309 - new tcs for domestic standing orders
Browse files Browse the repository at this point in the history
  • Loading branch information
wkrop committed Jul 20, 2023
1 parent 04acbca commit d1e3090
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 7 deletions.
53 changes: 46 additions & 7 deletions manifests/assertions.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,41 +81,80 @@
"OB3GLOAssertNumberOfPayments": {
"expect": {
"matches": [{
"JSON": "Data.StandingOrder.#.NumberOfPayments",
"JSON": "Data.Initiation.NumberOfPayments",
"detail": "Expected NumberOfPayments to be present."
}]
}
},
"OB3GLOAssertBulkNumberOfPayments": {
"expect": {
"matches": [{
"JSON": "Data.StandingOrder.#.NumberOfPayments",
"detail": "Expected NumberOfPayments (array) to be present."
}]
}
},
"OB3GLOAssertNoNumberOfPayments": {
"expect": {
"matches": [{
"JSON-NOT-PRESENT": "Data.Initiation.NumberOfPayments",
"detail": "Expected NumberOfPayments to be not present."
}]
}
},
"OB3GLOAssertBulkNoNumberOfPayments": {
"expect": {
"matches": [{
"JSON-NOT-PRESENT": "Data.StandingOrder.#.NumberOfPayments",
"detail": "Expected NumberOfPayments to be present."
"detail": "Expected NumberOfPayments (array) to be not present."
}]
}
},
"OB3GLOAssertFinalPaymentDateTime": {
"expect": {
"matches": [{
"JSON": "Data.StandingOrder.#.FinalPaymentDateTime",
"JSON": "Data.Initiation.FinalPaymentDateTime",
"detail": "Expected FinalPaymentDateTime to be present."
}]
}
},
"OB3GLOAssertBulkFinalPaymentDateTime": {
"expect": {
"matches": [{
"JSON": "Data.StandingOrder.#.FinalPaymentDateTime",
"detail": "Expected FinalPaymentDateTime (array) to be present."
}]
}
},
"OB3GLOAssertNoFinalPaymentDateTime": {
"expect": {
"matches": [{
"JSON-NOT-PRESENT": "Data.Initiation.FinalPaymentDateTime",
"detail": "Expected FinalPaymentDateTime to be not present."
}]
}
},
"OB3GLOAssertBulkNoFinalPaymentDateTime": {
"expect": {
"matches": [{
"JSON-NOT-PRESENT": "Data.StandingOrder.#.FinalPaymentDateTime",
"detail": "Expected FinalPaymentDateTime to be present."
"detail": "Expected FinalPaymentDateTime (array) to be not present."
}]
}
},
"OB3GLOAssertFinalPaymentAmountOn403": {
"OB3GLOAssertFinalPaymentAmount": {
"expect": {
"matches": [{
"JSON": "Data.Initiation.FirstPaymentAmount",
"detail": "Expected FinalPaymentAmount to be present."
}]
}
},
"OB3GLOAssertBulkFinalPaymentAmount": {
"expect": {
"status-code": 403,
"matches": [{
"JSON": "Data.StandingOrder.#.FirstPaymentAmount",
"detail": "Expected status code 403 (Forbidden) when FinalPaymentAmount is present."
"detail": "Expected FinalPaymentAmount (array) to be present."
}]
}
},
Expand Down
43 changes: 43 additions & 0 deletions manifests/ob_3.1_payment_fca.json
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,49 @@
"schemaCheck": true,
"validateSignature": true
},
{
"description": "Fails when NumberOfPayments, FinalPaymentDateTime are specified at the time.",
"id": "OB-301-DOP-1015001",
"refURI": "https://openbanking.atlassian.net/wiki/spaces/DZ/pages/1000670131/Domestic+Standing+Orders+v3.1.1#DomesticStandingOrdersv3.1.1-GET/domestic-standing-orders/{DomesticStandingOrderId}",
"detail": "Checks if NumberOfPayments, FinalPaymentDateTime are specified at the time.",
"parameters": {
"tokenRequestScope": "payments",
"paymentID": "$OB-301-DOP-101401-DomesticStandingOrderID"
},
"uri": "/domestic-standing-orders/$paymentID",
"uriImplementation": "conditional",
"resource": "DomesticScheduledPayment",
"asserts_last_if_all": [
"OB3GLOAssertNumberOfPayments",
"OB3GLOAssertFinalPaymentDateTime",
"OB3GLOAssertOn403"
],
"method": "get",
"schemaCheck": true,
"validateSignature": true
},
{
"description": "Fails when NumberOfPayments, FinalPaymentDateTime are not specified and FinalPaymentAmount is specified.",
"id": "OB-301-DOP-1015002",
"refURI": "https://openbanking.atlassian.net/wiki/spaces/DZ/pages/1000670131/Domestic+Standing+Orders+v3.1.1#DomesticStandingOrdersv3.1.1-GET/domestic-standing-orders/{DomesticStandingOrderId}",
"detail": "Checks if NumberOfPayments, FinalPaymentDateTime are not specified and FinalPaymentAmount is specified.",
"parameters": {
"tokenRequestScope": "payments",
"paymentID": "$OB-301-DOP-101401-DomesticStandingOrderID"
},
"uri": "/domestic-standing-orders/$paymentID",
"uriImplementation": "conditional",
"resource": "DomesticScheduledPayment",
"asserts_last_if_all": [
"OB3GLOAssertNoNumberOfPayments",
"OB3GLOAssertNoFinalPaymentDateTime",
"OB3GLOAssertFinalPaymentAmount",
"OB3GLOAssertOn403"
],
"method": "get",
"schemaCheck": true,
"validateSignature": true
},
{
"description": "International Payment consent succeeds with minimal data set with additional schema checks.",
"id": "OB-301-DOP-101600",
Expand Down

0 comments on commit d1e3090

Please sign in to comment.