Skip to content

Commit

Permalink
DT-1793 Fixed the manual mode of eBL TD-only UC6
Browse files Browse the repository at this point in the history
  • Loading branch information
gj0dcsa committed Sep 30, 2024
1 parent 7017785 commit 7f2d101
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
],
"documentParties": {
"bookingAgent": {
"partyName": "DCSA Conformance Toolkit",
"partyName": "DCSA Conformance Sandbox",
"address": {
"name": "Mustermann",
"street": "Strawinskylaan 4117",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
],
"documentParties": {
"bookingAgent": {
"partyName": "DCSA Conformance Toolkit",
"partyName": "DCSA Conformance Sandbox",
"address": {
"street": "Strawinskylaan 4117",
"floor": "6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
],
"documentParties": {
"bookingAgent": {
"partyName": "DCSA Conformance Toolkit",
"partyName": "DCSA Conformance Sandbox",
"address": {
"street": "Strawinskylaan 4117",
"floor": "6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
],
"documentParties": {
"bookingAgent": {
"partyName": "DCSA Conformance Toolkit",
"partyName": "DCSA Conformance Sandbox",
"address": {
"street": "Strawinskylaan 4117",
"floor": "6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
],
"documentParties": {
"bookingAgent": {
"partyName": "DCSA Conformance Toolkit",
"partyName": "DCSA Conformance Sandbox",
"address": {
"street": "Strawinskylaan 4117",
"floor": "6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
],
"documentParties": {
"bookingAgent": {
"partyName": "DCSA Conformance Toolkit",
"partyName": "DCSA Conformance Sandbox",
"address": {
"name": "Mustermann",
"street": "Strawinskylaan 4117",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
],
"documentParties": {
"bookingAgent": {
"partyName": "DCSA Conformance Toolkit",
"partyName": "DCSA Conformance Sandbox",
"address": {
"street": "Strawinskylaan 4117",
"floor": "6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
],
"documentParties": {
"bookingAgent": {
"partyName": "DCSA Conformance Toolkit",
"partyName": "DCSA Conformance Sandbox",
"address": {
"street": "Strawinskylaan 4117",
"floor": "6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
],
"documentParties": {
"bookingAgent": {
"partyName": "DCSA Conformance Toolkit",
"partyName": "DCSA Conformance Sandbox",
"address": {
"street": "Strawinskylaan 4117",
"floor": "6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
],
"documentParties": {
"bookingAgent": {
"partyName": "DCSA Conformance Toolkit",
"partyName": "DCSA Conformance Sandbox",
"address": {
"street": "Strawinskylaan 4117",
"floor": "6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public UC12_Carrier_AwaitSurrenderRequestForDeliveryAction(

@Override
public String getHumanReadablePrompt() {
return ("UC12: Shipper requests surrender for delivery (via the surrender API if applicable) for transport document with reference %s and carrier sends notification that surrender has been requested. Note when the conformance toolkit is acting as carrier, no action is required from the shipper (the action will auto-resolve). When the conformance toolkit is acting like the Shipper, you will have to ensure that the carrier system sees a surrender request (the surrender uses a different API not in scope for this test)."
return ("UC12: Shipper requests surrender for delivery (via the surrender API if applicable) for transport document with reference %s and carrier sends notification that surrender has been requested. Note when the conformance sandbox is acting as carrier, no action is required from the shipper (the action will auto-resolve). When the conformance sandbox is acting like the Shipper, you will have to ensure that the carrier system sees a surrender request (the surrender uses a different API not in scope for this test)."
.formatted(getDspSupplier().get().transportDocumentReference()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ public boolean isInputRequired() {
@Override
public void handlePartyInput(JsonNode partyInput) throws UserFacingException {
super.handlePartyInput(partyInput);
getDspConsumer().accept(getDspSupplier().get().withTransportDocumentReference(partyInput.path("transportDocumentReference").asText()));
getDspConsumer()
.accept(
getDspSupplier()
.get()
.withTransportDocumentReference(
partyInput.required("input").path("transportDocumentReference").asText()));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public UC9_Carrier_AwaitSurrenderRequestForAmendmentAction(

@Override
public String getHumanReadablePrompt() {
return ("UC9: Shipper requests surrender for amendment (via the surrender API if applicable) for transport document with reference %s and carrier sends notification that surrender has been requested. Note when the conformance toolkit is acting as carrier, no action is required from the shipper (the action will auto-resolve). When the conformance toolkit is acting like the Shipper, you will have to ensure that the carrier system sees a surrender request (the surrender uses a different API not in scope for this test)."
return ("UC9: Shipper requests surrender for amendment (via the surrender API if applicable) for transport document with reference %s and carrier sends notification that surrender has been requested. Note when the conformance sandbox is acting as carrier, no action is required from the shipper (the action will auto-resolve). When the conformance sandbox is acting like the Shipper, you will have to ensure that the carrier system sees a surrender request (the surrender uses a different API not in scope for this test)."
.formatted(getDspSupplier().get().transportDocumentReference()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public void provideField(JsonNode source, ObjectNode dest, String standardsVersi
// We always add a charge per amendment to ensure an amendment is never identical to the document
// it replaces (which could cause issues with the issuance API). In reality, the carrier would also
// change some other detail (like the requested change or the issuance date). But in the
// conformance tests every thing happens in the same day and when the conformance toolkit is
// conformance tests every thing happens in the same day and when the conformance sandbox is
// the carrier, booking amendments are "zero-change" amendments.
field("charges", (o, a, v) -> addCharge(o.putArray(a)), (o, a, v) -> addCharge(o.path(a))),
initialFieldValue("transports", (o, a, v) -> initializeTransports(o, o.putObject(a), v))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ private void publishDraftTransportDocument(JsonNode actionPrompt) {
}
generateAndEmitNotificationFromTransportDocument(actionPrompt, si, true);

addOperatorLogEntry("Published draft transport document '%s'".formatted(documentReference));
addOperatorLogEntry("Published draft transport document '%s'".formatted(si.getTransportDocumentReference()));
}

private void issueTransportDocument(JsonNode actionPrompt) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public boolean receiveMissingDocument(String checksum) {
// Which it will be in day-to-day tests until someone breaks sha256 like
// sha1 was broken (though that will likely not happen for many years and
// is not really worth the effort to guard against in the conformance
// toolkit as it is impossible for us device a test where the checksums
// scenario as it is impossible for us device a test where the checksums
// match but the sizes differs - if we could, the sha256 checksum would
// be broken!)
idx = i;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<sonar.projectKey>Conformance-Gateway</sonar.projectKey>
</properties>

<name>Conformance Toolkit parent</name>
<name>Conformance Framework parent</name>
<url>https://dcsa.org/</url>

<organization>
Expand Down

0 comments on commit 7f2d101

Please sign in to comment.