Search in sources :

Example 6 with IgnoredNaptrTest

use of com.helger.smpclient.IgnoredNaptrTest in project peppol-commons by phax.

the class BDXLURLProviderTest method testResolvePeppol.

@Test
@Ignore("Because it may take long to execute")
@IgnoredNaptrTest
public void testResolvePeppol() throws SMPDNSResolutionException {
    // Only if online
    if (NetworkOnlineStatusDeterminator.getNetworkStatus().isOnline()) {
        final IBDXLURLProvider aURLProvider = BDXLURLProvider.INSTANCE;
        final IParticipantIdentifier aPI = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9915:test");
        final String sDomain = aURLProvider.getDNSNameOfParticipant(aPI, ESML.DIGIT_TEST);
        assertEquals("EH5BOAVAKTMBGZYH2A63DZ4QOV33FVP5NSDVQKLUCFRAAYOODW6A.iso6523-actorid-upis.acc.edelivery.tech.ec.europa.eu", sDomain);
        final URL x = aURLProvider.getSMPURLOfParticipant(aPI, ESML.DIGIT_TEST);
        assertNotNull(x);
        if (true)
            assertEquals("http://test-infra.peppol.at", x.toString());
        else
            assertEquals("BRZ-TEST-SMP.publisher.acc.edelivery.tech.ec.europa.eu", x.toString());
    }
}
Also used : URL(java.net.URL) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Ignore(org.junit.Ignore) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) Test(org.junit.Test)

Example 7 with IgnoredNaptrTest

use of com.helger.smpclient.IgnoredNaptrTest in project peppol-commons by phax.

the class BPCURLProviderSMP1Test method testGetSMPURIOfParticipant.

@Test
@Ignore("Because it may take long to execute")
@IgnoredNaptrTest
public void testGetSMPURIOfParticipant() throws SMPDNSResolutionException {
    final SimpleParticipantIdentifier aPI = new SimpleParticipantIdentifier("urn:oasis:names:tc:ebcore:partyid-type:iso6523:0060", "123456789");
    final URI x = BPCURLProviderSMP1.INSTANCE.getSMPURIOfParticipant(aPI, "bpc02.b2bei.us.");
    assertEquals("https://bpc-smp.bdxhub.com/", x.toString());
}
Also used : URI(java.net.URI) SimpleParticipantIdentifier(com.helger.peppolid.simple.participant.SimpleParticipantIdentifier) Ignore(org.junit.Ignore) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) Test(org.junit.Test)

Example 8 with IgnoredNaptrTest

use of com.helger.smpclient.IgnoredNaptrTest in project peppol-commons by phax.

the class BPCURLProviderSMP2Test method testGetSMPURIOfParticipant.

@Test
@Ignore("Because it may take long to execute")
@IgnoredNaptrTest
public void testGetSMPURIOfParticipant() throws SMPDNSResolutionException {
    final SimpleParticipantIdentifier aPI = new SimpleParticipantIdentifier("urn:oasis:names:tc:ebcore:partyid-type:iso6523:0060", "123456789");
    final URI x = BPCURLProviderSMP2.INSTANCE.getSMPURIOfParticipant(aPI, "bpc02.b2bei.us.");
    assertEquals("https://bpc-smp.bdxhub.com/", x.toString());
}
Also used : URI(java.net.URI) SimpleParticipantIdentifier(com.helger.peppolid.simple.participant.SimpleParticipantIdentifier) Ignore(org.junit.Ignore) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) IgnoredNaptrTest(com.helger.smpclient.IgnoredNaptrTest) Test(org.junit.Test)

Aggregations

IgnoredNaptrTest (com.helger.smpclient.IgnoredNaptrTest)8 Ignore (org.junit.Ignore)8 Test (org.junit.Test)8 IParticipantIdentifier (com.helger.peppolid.IParticipantIdentifier)6 ISMLInfo (com.helger.peppol.sml.ISMLInfo)3 SMLInfo (com.helger.peppol.sml.SMLInfo)3 IDocumentTypeIdentifier (com.helger.peppolid.IDocumentTypeIdentifier)3 SignedServiceMetadataType (com.helger.xsds.bdxr.smp1.SignedServiceMetadataType)3 SimpleParticipantIdentifier (com.helger.peppolid.simple.participant.SimpleParticipantIdentifier)2 URI (java.net.URI)2 URL (java.net.URL)1 KeyStore (java.security.KeyStore)1