EBL Transportdoctype code swb validation#513
Conversation
Review Summary by QodoAdd SWB negotiability validation and test coverage
WalkthroughsDescription• Add validation to prevent SWB transport documents from being negotiable • Implement custom validator checking isToOrder flag for SWBs • Register new validation check in static TD checks list • Add comprehensive test coverage for SWB negotiability validation Diagramflowchart LR
A["SWB Document"] -->|transportDocumentTypeCode check| B["SWBS_CANNOT_BE_NEGOTIABLE"]
B -->|isToOrder validation| C["Custom Validator"]
C -->|true| D["Validation Fails"]
C -->|false/absent| E["Validation Passes"]
B -->|registered in| F["STATIC_TD_CHECKS"]
B -->|registered in| G["allDg checks"]
File Changes1. ebl/src/main/java/org/dcsa/conformance/standards/ebl/checks/EblChecks.java
|
Code Review by Qodo
1. BOL isToOrder=false allowed
|
There was a problem hiding this comment.
Pull request overview
Adds a dedicated conformance rule to ensure Sea Waybills (SWB) are never marked negotiable (isToOrder=true), aligning validation with SWB business rules.
Changes:
- Introduces
SWBS_CANNOT_BE_NEGOTIABLEvalidation inEblChecks. - Registers the new validation in both static Shipping Instructions and Transport Document check lists.
- Adds unit tests covering pass/fail/irrelevant scenarios for the new validation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
ebl/src/main/java/org/dcsa/conformance/standards/ebl/checks/EblChecks.java |
Adds and wires a new SWB negotiability validation into the standard check sets. |
ebl/src/test/java/org/dcsa/conformance/standards/ebl/checks/EblChecksTest.java |
Adds unit coverage for the new SWB negotiability rule. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pedrocarvalhodcsa
left a comment
There was a problem hiding this comment.
Seems good to me, I don't really understand the comment from copilot
No description provided.