use of org.infobip.mobile.messaging.mobile.BatchReporter in project mobile-messaging-sdk-android by infobip.
the class BatchReporterTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
batchReporter = new BatchReporter(50L);
runnable = Mockito.mock(Runnable.class);
}
use of org.infobip.mobile.messaging.mobile.BatchReporter in project mobile-messaging-sdk-android by infobip.
the class SeenStatusReporterTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
batchReporter = new BatchReporter(100L);
mobileApiMessages = mock(MobileApiMessages.class);
executor = newSingleThreadExecutor();
MobileMessagingStats stats = mobileMessagingCore.getStats();
executor = mock(Executor.class);
seenStatusReporter = new SeenStatusReporter(mobileMessagingCore, stats, executor, broadcaster, mobileApiMessages, batchReporter);
}
use of org.infobip.mobile.messaging.mobile.BatchReporter in project mobile-messaging-sdk-android by infobip.
the class PushUnregisteredTest method setUp.
@SuppressLint({ "CommitPrefEdits", "ApplySharedPref" })
@Override
public void setUp() throws Exception {
super.setUp();
ExecutorService taskExecutor = Executors.newSingleThreadExecutor();
MobileMessagingStats stats = mobileMessagingCore.getStats();
PreferenceHelper.saveLong(context, MobileMessagingProperty.BATCH_REPORTING_DELAY, 100L);
PreferenceHelper.saveBoolean(context, MobileMessagingProperty.GEOFENCING_ACTIVATED, true);
mobileApiMessages = mock(MobileApiMessages.class);
mobileApiGeo = mock(MobileApiGeo.class);
mobileMessageHandler = mock(MobileMessageHandler.class);
RetryPolicyProvider retryPolicyProvider = new RetryPolicyProvider(context);
retryPolicy = retryPolicyProvider.DEFAULT();
registrationSynchronizer = new RegistrationSynchronizer(context, mobileMessagingCore, stats, taskExecutor, coreBroadcaster, retryPolicyProvider, mobileApiRegistration);
seenStatusReporter = new SeenStatusReporter(mobileMessagingCore, stats, taskExecutor, coreBroadcaster, mobileApiMessages, new BatchReporter(100L));
geoReporter = new GeoReporter(context, mobileMessagingCore, geoBroadcaster, mobileMessagingCore.getStats(), mobileApiGeo);
messagesSynchronizer = new MessagesSynchronizer(mobileMessagingCore, stats, taskExecutor, coreBroadcaster, retryPolicy, mobileMessageHandler, mobileApiMessages);
captor = ArgumentCaptor.forClass(Boolean.class);
}
Aggregations