use of com.helger.phase4.ebms3header.Ebms3PartyId in project phase4 by phax.
the class ENTSOGCompatibilityValidatorTest method testValidateUserMessageMoreThanOnePartyID.
@Test
public void testValidateUserMessageMoreThanOnePartyID() {
final Ebms3PartyId aFirstId = MessageHelperMethods.createEbms3PartyId("type", "value");
final Ebms3PartyId aSecondId = MessageHelperMethods.createEbms3PartyId("type2", "value2");
final Ebms3From aFromPart = new Ebms3From();
aFromPart.addPartyId(aFirstId);
aFromPart.addPartyId(aSecondId);
final Ebms3To aToPart = new Ebms3To();
aToPart.addPartyId(aFirstId);
aToPart.addPartyId(aSecondId);
final Ebms3PartyInfo aPartyInfo = new Ebms3PartyInfo();
aPartyInfo.setFrom(aFromPart);
aPartyInfo.setTo(aToPart);
final Ebms3UserMessage aUserMessage = new Ebms3UserMessage();
aUserMessage.setPartyInfo(aPartyInfo);
VALIDATOR.validateUserMessage(aUserMessage, m_aErrorList);
assertTrue(m_aErrorList.containsAny(x -> x.getErrorText(LOCALE).contains("must contain no more than one PartyID")));
}
Aggregations