Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
gj0dcsa committed Nov 20, 2024
2 parents 4a1d469 + 40c3383 commit 69df1ea
Show file tree
Hide file tree
Showing 27 changed files with 875 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,19 @@ private static void generateScenarioRelatedChecks(List<JsonContentCheck> checks,
"carrierServiceName",
delayedValue(cspSupplier, CarrierScenarioParameters::carrierServiceName)
));
checks.add(JsonAttribute.mustEqual(
"[Scenario] Verify that the correct 'contractQuotationReference' is used",
"contractQuotationReference",
delayedValue(cspSupplier, CarrierScenarioParameters::contractQuotationReference)
));

checks.add(JsonAttribute.customValidator(
"[Scenario] Verify that the correct 'contractQuotationReference'/'serviceContractReference' is used",
body -> {
var contractQuotationReference = body.path("contractQuotationReference").asText("");
var serviceContractReference = body.path("serviceContractReference").asText("");
if (!contractQuotationReference.isEmpty() && !serviceContractReference.isEmpty()) {
return Set.of("The scenario requires either of 'contractQuotationReference'/'serviceContractReference'" +
" to be present, but not both");
}
return Set.of();
}
));

checks.add(JsonAttribute.mustEqual(
"[Scenario] Verify that the correct 'carrierExportVoyageNumber' is used",
Expand Down Expand Up @@ -609,7 +617,7 @@ private static void generateScenarioRelatedChecks(List<JsonContentCheck> checks,
JsonPointer.compile("/expectedArrivalAtPlaceOfDeliveryEndDate"),
JsonPointer.compile("/carrierExportVoyageNumber")
),
JsonAttribute.atLeastOneOf(
JsonAttribute.xOrFields(
JsonPointer.compile("/contractQuotationReference"),
JsonPointer.compile("/serviceContractReference")
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"cargoMovementTypeAtOrigin": "FCL",
"cargoMovementTypeAtDestination": "FCL",
"serviceContractReference": "SERVICE_CONTRACT_REFERENCE_PLACEHOLDER",
"contractQuotationReference": "CONTRACT_QUOTATION_REFERENCE_PLACEHOLDER",
"carrierExportVoyageNumber": "CARRIER_EXPORT_VOYAGE_NUMBER_PLACEHOLDER",
"carrierServiceName": "CARRIER_SERVICE_NAME_PLACEHOLDER",
"isPartialLoadAllowed": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"cargoMovementTypeAtOrigin": "FCL",
"cargoMovementTypeAtDestination": "FCL",
"serviceContractReference": "SERVICE_CONTRACT_REFERENCE_PLACEHOLDER",
"contractQuotationReference": "CONTRACT_QUOTATION_REFERENCE_PLACEHOLDER",
"carrierExportVoyageNumber": "CARRIER_EXPORT_VOYAGE_NUMBER_PLACEHOLDER",
"carrierServiceName": "CARRIER_SERVICE_NAME_PLACEHOLDER",
"isPartialLoadAllowed": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"cargoMovementTypeAtOrigin": "FCL",
"cargoMovementTypeAtDestination": "FCL",
"serviceContractReference": "SERVICE_CONTRACT_REFERENCE_PLACEHOLDER",
"contractQuotationReference": "CONTRACT_QUOTATION_REFERENCE_PLACEHOLDER",
"carrierExportVoyageNumber": "CARRIER_EXPORT_VOYAGE_NUMBER_PLACEHOLDER",
"carrierServiceName": "CARRIER_SERVICE_NAME_PLACEHOLDER",
"isPartialLoadAllowed": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"cargoMovementTypeAtOrigin": "FCL",
"cargoMovementTypeAtDestination": "FCL",
"serviceContractReference": "SERVICE_CONTRACT_REFERENCE_PLACEHOLDER",
"contractQuotationReference": "CONTRACT_QUOTATION_REFERENCE_PLACEHOLDER",
"carrierExportVoyageNumber": "CARRIER_EXPORT_VOYAGE_NUMBER_PLACEHOLDER",
"carrierServiceName": "CARRIER_SERVICE_NAME_PLACEHOLDER",
"isPartialLoadAllowed": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"cargoMovementTypeAtOrigin": "FCL",
"cargoMovementTypeAtDestination": "FCL",
"serviceContractReference": "SERVICE_CONTRACT_REFERENCE_PLACEHOLDER",
"contractQuotationReference": "CONTRACT_QUOTATION_REFERENCE_PLACEHOLDER",
"carrierExportVoyageNumber": "CARRIER_EXPORT_VOYAGE_NUMBER_PLACEHOLDER",
"carrierServiceName": "CARRIER_SERVICE_NAME_PLACEHOLDER",
"isPartialLoadAllowed": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"cargoMovementTypeAtOrigin": "FCL",
"cargoMovementTypeAtDestination": "FCL",
"serviceContractReference": "SERVICE_CONTRACT_REFERENCE_PLACEHOLDER",
"contractQuotationReference": "CONTRACT_QUOTATION_REFERENCE_PLACEHOLDER",
"carrierExportVoyageNumber": "CARRIER_EXPORT_VOYAGE_NUMBER_PLACEHOLDER",
"carrierServiceName": "CARRIER_SERVICE_NAME_PLACEHOLDER",
"isPartialLoadAllowed": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"cargoMovementTypeAtOrigin": "FCL",
"cargoMovementTypeAtDestination": "FCL",
"serviceContractReference": "SERVICE_CONTRACT_REFERENCE_PLACEHOLDER",
"contractQuotationReference": "CONTRACT_QUOTATION_REFERENCE_PLACEHOLDER",
"carrierExportVoyageNumber": "CARRIER_EXPORT_VOYAGE_NUMBER_PLACEHOLDER",
"carrierServiceName": "CARRIER_SERVICE_NAME_PLACEHOLDER",
"isPartialLoadAllowed": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"cargoMovementTypeAtOrigin": "FCL",
"cargoMovementTypeAtDestination": "FCL",
"serviceContractReference": "SERVICE_CONTRACT_REFERENCE_PLACEHOLDER",
"contractQuotationReference": "CONTRACT_QUOTATION_REFERENCE_PLACEHOLDER",
"carrierExportVoyageNumber": "CARRIER_EXPORT_VOYAGE_NUMBER_PLACEHOLDER",
"carrierServiceName": "CARRIER_SERVICE_NAME_PLACEHOLDER",
"isPartialLoadAllowed": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"cargoMovementTypeAtOrigin": "FCL",
"cargoMovementTypeAtDestination": "FCL",
"serviceContractReference": "SERVICE_CONTRACT_REFERENCE_PLACEHOLDER",
"contractQuotationReference": "CONTRACT_QUOTATION_REFERENCE_PLACEHOLDER",
"carrierExportVoyageNumber": "CARRIER_EXPORT_VOYAGE_NUMBER_PLACEHOLDER",
"carrierServiceName": "CARRIER_SERVICE_NAME_PLACEHOLDER",
"isPartialLoadAllowed": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"portChargesPaymentTermCode": "PRE",
"otherChargesPaymentTermCode": "PRE"
},
"contractQuotationReference": "CONTRACT_QUOTATION_REFERENCE_PLACEHOLDER",
"vessel": {
"name": "King of the Seas",
"vesselIMONumber": "9298686"
Expand Down
Loading

0 comments on commit 69df1ea

Please sign in to comment.