Search in sources :

Example 31 with ApnsService

use of com.notnoop.apns.ApnsService in project camel by apache.

the class ApnsServiceFactoryTest method testApnsServiceFactoryAsPool1.

@Test
public void testApnsServiceFactoryAsPool1() throws Exception {
    ApnsServiceFactory apnsServiceFactory = createApnsServiceFactoryWithFixedCertificatesAsPool(1);
    ApnsService apnsService = apnsServiceFactory.getApnsService();
    doBasicAsserts(apnsService);
}
Also used : ApnsService(com.notnoop.apns.ApnsService) Test(org.junit.Test)

Example 32 with ApnsService

use of com.notnoop.apns.ApnsService in project camel by apache.

the class ApnsServiceFactoryTest method testApnsServiceFactoryAsPool0.

@Test(expected = IllegalArgumentException.class)
public void testApnsServiceFactoryAsPool0() throws Exception {
    ApnsServiceFactory apnsServiceFactory = createApnsServiceFactoryWithFixedCertificatesAsPool(0);
    ApnsService apnsService = apnsServiceFactory.getApnsService();
    doBasicAsserts(apnsService);
}
Also used : ApnsService(com.notnoop.apns.ApnsService) Test(org.junit.Test)

Aggregations

ApnsService (com.notnoop.apns.ApnsService)32 Test (org.junit.Test)20 ApnsNotification (com.notnoop.apns.ApnsNotification)5 DeliveryError (com.notnoop.apns.DeliveryError)5 EnhancedApnsNotification (com.notnoop.apns.EnhancedApnsNotification)5 SimpleApnsNotification (com.notnoop.apns.SimpleApnsNotification)5 StartSendingApnsDelegate (com.notnoop.apns.StartSendingApnsDelegate)5 ApnsServerStub (com.notnoop.apns.utils.ApnsServerStub)5 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)5 CountDownLatch (java.util.concurrent.CountDownLatch)4 CamelContext (org.apache.camel.CamelContext)4 ApnsServiceFactory (org.apache.camel.component.apns.factory.ApnsServiceFactory)4 ApnsDelegate (com.notnoop.apns.ApnsDelegate)2 Repeat (com.notnoop.apns.utils.junit.Repeat)2 ApnsServiceBuilder (com.notnoop.apns.ApnsServiceBuilder)1 ConnectionStub (com.notnoop.apns.internal.QueuedApnsServiceTest.ConnectionStub)1 NetworkIOException (com.notnoop.exceptions.NetworkIOException)1 IOException (java.io.IOException)1 SocketTimeoutException (java.net.SocketTimeoutException)1 GeneralSecurityException (java.security.GeneralSecurityException)1