use of com.google.firebase.crashlytics.internal.analytics.AnalyticsEventLogger in project firebase-android-sdk by firebase.
the class CrashlyticsControllerTest method testFatalEvent_sendsAppExceptionEvent.
public void testFatalEvent_sendsAppExceptionEvent() {
final String sessionId = "sessionId";
final LogFileManager logFileManager = new LogFileManager(testFileStore);
final AnalyticsEventLogger mockFirebaseAnalyticsLogger = mock(AnalyticsEventLogger.class);
final CrashlyticsController controller = builder().setAnalyticsEventLogger(mockFirebaseAnalyticsLogger).setLogFileManager(logFileManager).build();
when(mockSessionReportingCoordinator.listSortedOpenSessionIds()).thenReturn(new TreeSet<>(Collections.singleton(sessionId)));
controller.openSession(SESSION_ID);
controller.handleUncaughtException(testSettingsProvider, Thread.currentThread(), new RuntimeException("Fatal"));
controller.finalizeSessions(testSettingsProvider);
assertFirebaseAnalyticsCrashEvent(mockFirebaseAnalyticsLogger);
}
Aggregations