Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BDEWCompatibilityValidator: extended validation of UserMessages #190

Merged

Conversation

koes-soptim
Copy link
Contributor

I extended the validation of UserMessages in BDEWCompatibilityValidator to cover the following requirements of the BDEW AS4 profile:

(see https://www.edi-energy.de/index.php?id=38&tx_bdew_bdew%5Buid%5D=2091&tx_bdew_bdew%5Baction%5D=download&tx_bdew_bdew%5Bcontroller%5D=Dokument&cHash=c3338aa8cb55e5946a1b0d1dbfdc2e0a, chapters 2.3.1.2.1, 2.3.1.2.2 and 2.3.1.2.3)

  • PartyInfo/From/Role (static value)
  • PartyInfo/To/Role (static value)
  • CollaborationInfo/Service (a set of static values)
  • CollaborationInfo/Action (a set of static values)

Among tests for the new validations, I added two unit tests that test the "happy flow" for PMode and UserMessages.

PartyInfo/Roles, CollaborationInfo/Service, CollaborationInfo/Action, Unit-Tests
Copy link
Owner

@phax phax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small optimizations....

aErrorList.add (_createError ("PartyInfo/To must contain no more than one PartyID"));
}

if (StringHelper.hasNoText (aTo.getRole ()) || !aTo.getRole ().equals (CAS4.DEFAULT_RESPONDER_URL))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the same as if (!CAS4.DEFAULT_RESPONDER_URL.equals (aFrom.getRole ())) right?

@phax phax added enhancement Profile BDEW BDEW AS4 related labels Nov 9, 2023
@phax phax self-assigned this Nov 9, 2023
@phax phax merged commit a893502 into phax:master Nov 9, 2023
2 checks passed
@phax
Copy link
Owner

phax commented Nov 9, 2023

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants