-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix API endpoint in integration tests and add new
test case for PalindromeNumber
- Loading branch information
Showing
4 changed files
with
240 additions
and
23 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
test/Marsen.NetCore.Dojo.Integration.Tests/Kata/PickupService/PickUpService.http
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
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
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 |
---|---|---|
|
@@ -9,4 +9,214 @@ | |
必須來進行修正。 | ||
|
||
上一次用遺留代碼來開發,這次沒有代碼了,只剩遺留的測試。 | ||
有趣! 讓我來試試看吧 | ||
有趣! 讓我來試試看吧 | ||
|
||
## Mock API | ||
|
||
### Test case DONE | ||
|
||
```json | ||
{ | ||
"result": "success", | ||
"content": [ | ||
{ | ||
"merchantId": "123", | ||
"merchantRef": "ABC123", | ||
"waybillNo": "W123456", | ||
"locationId": "456", | ||
"pudoRef": "PUDO789", | ||
"pudoVerifyCode": "1234", | ||
"senderId": "Sender123", | ||
"consigneeId": "Consignee456", | ||
"customerName": "John Doe", | ||
"customerAddress1": "123 Main St", | ||
"customerAddress2": "Apt 456", | ||
"customerAddress3": "Suburb", | ||
"customerAddress4": "City", | ||
"feedbackURL": "https://example.com/feedback", | ||
"eta": "2023-01-01", | ||
"codAmt": "50.00", | ||
"sizeCode": "L", | ||
"lastStatusId": "DONE", | ||
"lastStatusDescription": "Delivered to Customer", | ||
"lastStatusDate": "2023-01-01", | ||
"lastStatusTime": "12:34:56", | ||
"customerMobile": "1234567890", | ||
"customerEmail": "[email protected]", | ||
"errorCode": null | ||
} | ||
] | ||
} | ||
|
||
``` | ||
|
||
### Test case Shipping | ||
|
||
```json | ||
{ | ||
"result": "success", | ||
"content": [ | ||
{ | ||
"merchantId": "123", | ||
"merchantRef": "ABC123", | ||
"waybillNo": "W123456", | ||
"locationId": "456", | ||
"pudoRef": "PUDO789", | ||
"pudoVerifyCode": "1234", | ||
"senderId": "Sender123", | ||
"consigneeId": "Consignee456", | ||
"customerName": "John Doe", | ||
"customerAddress1": "123 Main St", | ||
"customerAddress2": "Apt 456", | ||
"customerAddress3": "Suburb", | ||
"customerAddress4": "City", | ||
"feedbackURL": "https://example.com/feedback", | ||
"eta": "2023-01-01", | ||
"codAmt": "50.00", | ||
"sizeCode": "L", | ||
"lastStatusId": "Shipping", | ||
"lastStatusDescription": "Delivered to Customer", | ||
"lastStatusDate": "2023-01-01", | ||
"lastStatusTime": "12:34:56", | ||
"customerMobile": "1234567890", | ||
"customerEmail": "[email protected]", | ||
"errorCode": null | ||
} | ||
] | ||
} | ||
``` | ||
|
||
### Test case FAIL | ||
|
||
```json | ||
{ | ||
"result": "success", | ||
"content": [ | ||
{ | ||
"merchantId": "123", | ||
"merchantRef": "ABC123", | ||
"waybillNo": "W123456", | ||
"locationId": "456", | ||
"pudoRef": "PUDO789", | ||
"pudoVerifyCode": "1234", | ||
"senderId": "Sender123", | ||
"consigneeId": "Consignee456", | ||
"customerName": "John Doe", | ||
"customerAddress1": "123 Main St", | ||
"customerAddress2": "Apt 456", | ||
"customerAddress3": "Suburb", | ||
"customerAddress4": "City", | ||
"feedbackURL": "https://example.com/feedback", | ||
"eta": "2023-01-01", | ||
"codAmt": "50.00", | ||
"sizeCode": "L", | ||
"lastStatusId": "FAIL", | ||
"lastStatusDescription": "Delivered to Customer", | ||
"lastStatusDate": "2023-01-01", | ||
"lastStatusTime": "12:34:56", | ||
"customerMobile": "1234567890", | ||
"customerEmail": "[email protected]", | ||
"errorCode": null | ||
} | ||
] | ||
} | ||
``` | ||
|
||
### Test Case Expiry | ||
|
||
```json | ||
{ | ||
"result": "success", | ||
"content": [ | ||
{ | ||
"merchantId": "123", | ||
"merchantRef": "ABC123", | ||
"waybillNo": "W123456", | ||
"locationId": "456", | ||
"pudoRef": "PUDO789", | ||
"pudoVerifyCode": "1234", | ||
"senderId": "Sender123", | ||
"consigneeId": "Consignee456", | ||
"customerName": "John Doe", | ||
"customerAddress1": "123 Main St", | ||
"customerAddress2": "Apt 456", | ||
"customerAddress3": "Suburb", | ||
"customerAddress4": "City", | ||
"feedbackURL": "https://example.com/feedback", | ||
"eta": "2023-01-01", | ||
"codAmt": "50.00", | ||
"sizeCode": "L", | ||
"lastStatusId": "Expiry", | ||
"lastStatusDescription": "Delivered to Customer", | ||
"lastStatusDate": "2023-01-01", | ||
"lastStatusTime": "12:34:56", | ||
"customerMobile": "1234567890", | ||
"customerEmail": "[email protected]", | ||
"errorCode": null | ||
} | ||
] | ||
} | ||
``` | ||
|
||
### Test Case Arrived | ||
|
||
```json | ||
{ | ||
"result": "success", | ||
"content": [ | ||
{ | ||
"merchantId": "123", | ||
"merchantRef": "ABC123", | ||
"waybillNo": "W123456", | ||
"locationId": "456", | ||
"pudoRef": "PUDO789", | ||
"pudoVerifyCode": "1234", | ||
"senderId": "Sender123", | ||
"consigneeId": "Consignee456", | ||
"customerName": "John Doe", | ||
"customerAddress1": "123 Main St", | ||
"customerAddress2": "Apt 456", | ||
"customerAddress3": "Suburb", | ||
"customerAddress4": "City", | ||
"feedbackURL": "https://example.com/feedback", | ||
"eta": "2023-01-01", | ||
"codAmt": "50.00", | ||
"sizeCode": "L", | ||
"lastStatusId": "Arrived", | ||
"lastStatusDescription": "Delivered to Customer", | ||
"lastStatusDate": "2023-01-01", | ||
"lastStatusTime": "12:34:56", | ||
"customerMobile": "1234567890", | ||
"customerEmail": "[email protected]", | ||
"errorCode": null | ||
} | ||
] | ||
} | ||
``` | ||
|
||
|
||
|
||
### Test Case Error | ||
```json | ||
{ | ||
"result": "error", | ||
"content": [] | ||
} | ||
``` | ||
### Test Case Error Content | ||
|
||
```json | ||
{ | ||
"result": "success", | ||
"content": [] | ||
} | ||
``` | ||
|
||
### Test Case Exception | ||
|
||
```json | ||
Something Wrong | ||
|
||
``` | ||
|
||
(fin) |
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