Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Nov 25, 2024
1 parent 0c10dc1 commit 9ddfb3d
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,23 @@ public void testResolvePeppol () throws SMPDNSResolutionException
@Test
public void testResolveNamePeppol () throws SMPDNSResolutionException
{
// Only if online
final IPeppolURLProvider aURLProvider = PeppolNaptrURLProvider.INSTANCE;
final IParticipantIdentifier aPI = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("0088:1234567890123");
final String sDomain = aURLProvider.getDNSNameOfParticipant (aPI, ESML.DIGIT_TEST);
assertEquals ("SJSYVCCMQYJXK3WEUAPFFQ4X3UMCRF4QRYHERJ4VOVHMONH7GCCQ.iso6523-actorid-upis.acc.edelivery.tech.ec.europa.eu",
sDomain);

// Policy for use of Identifiers POLICY 7 example
assertEquals ("Y7DZFXAF3D4CJZ4KCGRXTEC6TWVCGA4KY7ZWA5BOIF6MSWD4TDRQ.iso6523-actorid-upis.acc.edelivery.tech.ec.europa.eu",
aURLProvider.getDNSNameOfParticipant (PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("0088:123abc"),
ESML.DIGIT_TEST));
assertEquals ("Y7DZFXAF3D4CJZ4KCGRXTEC6TWVCGA4KY7ZWA5BOIF6MSWD4TDRQ.iso6523-actorid-upis.acc.edelivery.tech.ec.europa.eu",
aURLProvider.getDNSNameOfParticipant (PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("0088:123ABC"),
ESML.DIGIT_TEST));

// Peppol SML Spec example
assertEquals ("XUKHFQABQZIKI3YKVR2FHR4SNFA3PF5VPQ6K4TONV3LMVSY5ARVQ.iso6523-actorid-upis.acc.edelivery.tech.ec.europa.eu",
aURLProvider.getDNSNameOfParticipant (PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("0010:5798000000001"),
ESML.DIGIT_TEST));
}
}

0 comments on commit 9ddfb3d

Please sign in to comment.