use of com.microsoft.appcenter.analytics.ingestion.models.EventLog in project mobile-center-sdk-android by Microsoft.
the class AnalyticsTest method testAnalyticsListenerNull.
@Test
public void testAnalyticsListenerNull() {
AnalyticsListener analyticsListener = mock(AnalyticsListener.class);
Analytics.setListener(analyticsListener);
Analytics.setListener(null);
final EventLog testEventLog = new EventLog();
testEventLog.setId(UUID.randomUUID());
testEventLog.setName("name");
final Exception testException = new Exception("test exception message");
Channel.GroupListener listener = Analytics.getInstance().getChannelListener();
listener.onBeforeSending(testEventLog);
listener.onSuccess(testEventLog);
listener.onFailure(testEventLog, testException);
verify(analyticsListener, never()).onBeforeSending(any(EventLog.class));
verify(analyticsListener, never()).onSendingSucceeded(any(EventLog.class));
verify(analyticsListener, never()).onSendingFailed(any(EventLog.class), any(Exception.class));
}
Aggregations