Skip to content

Commit

Permalink
added codes
Browse files Browse the repository at this point in the history
  • Loading branch information
xuelianhan007 committed Nov 5, 2024
1 parent cb16923 commit 73745fd
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
- name: enabled
expectType: EXPECTED
value: false
errorMsg: "instantSyncQuote==false"
errorMsg: "api use case is not supported : disabled : instantSyncQuote==false"
- name: product_type_eline
path: "$.body.quoteItem[*].product.productConfiguration.['@type']"
expectType: EXPECTED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
- name: enabled
expectType: EXPECTED
value: false
errorMsg: "instantSyncQuote==false"
errorMsg: "api use case is not supported : disabled : instantSyncQuote==false"
- name: product_type_UNI
path: "$.body.quoteItem[*].product.productConfiguration.['@type']"
expectType: EXPECTED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ public void enableChecking(Map<String, List<PathCheck>> facets, String targetKey
if (Objects.isNull(enabledOpt.get().errorMsg)) {
throw KrakenException.badRequest(MESSAGE_ALERT.formatted(":disabled"));
} else {
throw KrakenException.badRequest(
MESSAGE_ALERT.formatted(":disabled " + enabledOpt.get().errorMsg));
throw KrakenException.badRequest(enabledOpt.get().errorMsg);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ void givenPayloadMissMappingParam_whenOnCheck_thenReturnError() {
@Order(4)
@SneakyThrows
void givenErrorMsgInMatrixItem_whenChecking_thenThrowsExceptionMessageAsExpected() {
validateQuoteRequest("/mockData/quoteWithInstantSyncFalse.json", "instantSyncQuote==false");
String expected = "api use case is not supported : disabled : instantSyncQuote==false";
validateQuoteRequest("/mockData/quoteWithInstantSyncFalse.json", expected);
}

private void validateOrderRequest(String request, String matchedMsg) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
- name: enabled
expectType: EXPECTED
value: false
errorMsg: "instantSyncQuote==false"
errorMsg: "api use case is not supported : disabled : instantSyncQuote==false"
- name: product_type_UNI
path: "$.body.quoteItem[*].product.productConfiguration.['@type']"
expectType: EXPECTED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
- name: enabled
expectType: EXPECTED
value: false
errorMsg: "instantSyncQuote==false"
errorMsg: "api use case is not supported : disabled : instantSyncQuote==false"
- name: product_type_eline
path: "$.body.quoteItem[*].product.productConfiguration.['@type']"
expectType: EXPECTED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
- name: enabled
expectType: EXPECTED
value: false
errorMsg: "instantSyncQuote==false"
errorMsg: "api use case is not supported : disabled : instantSyncQuote==false"
- name: product_type_UNI
path: "$.body.quoteItem[*].product.productConfiguration.['@type']"
expectType: EXPECTED
Expand Down

0 comments on commit 73745fd

Please sign in to comment.