Skip to content

Commit 17d2d9d

Browse files
committed
Fix tests
1 parent 41ba207 commit 17d2d9d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

firebase-crashlytics/src/androidTest/java/com/google/firebase/crashlytics/internal/common/SessionReportingCoordinatorTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,13 @@ public void testNonFatalEvent_addsSortedKeysToEvent() {
229229
ImmutableList.from(customAttribute1, customAttribute2);
230230

231231
when(reportMetadata.getCustomKeys()).thenReturn(attributes);
232+
when(reportMetadata.getInternalKeys()).thenReturn(attributes);
232233

233234
reportingCoordinator.onBeginSession(sessionId, timestamp);
234235
reportingCoordinator.persistNonFatalEvent(mockException, mockThread, sessionId, timestamp);
235236

236237
verify(mockEventAppBuilder).setCustomAttributes(expectedCustomAttributes);
238+
verify(mockEventAppBuilder).setInternalKeys(expectedCustomAttributes);
237239
verify(mockEventAppBuilder).build();
238240
verify(mockEventBuilder).setApp(mockEventApp);
239241
verify(mockEventBuilder).build();
@@ -288,11 +290,13 @@ public void testFatalEvent_addsSortedKeysToEvent() {
288290
ImmutableList.from(customAttribute1, customAttribute2);
289291

290292
when(reportMetadata.getCustomKeys()).thenReturn(attributes);
293+
when(reportMetadata.getInternalKeys()).thenReturn(attributes);
291294

292295
reportingCoordinator.onBeginSession(sessionId, timestamp);
293296
reportingCoordinator.persistFatalEvent(mockException, mockThread, sessionId, timestamp);
294297

295298
verify(mockEventAppBuilder).setCustomAttributes(expectedCustomAttributes);
299+
verify(mockEventAppBuilder).setInternalKeys(expectedCustomAttributes);
296300
verify(mockEventAppBuilder).build();
297301
verify(mockEventBuilder).setApp(mockEventApp);
298302
verify(mockEventBuilder).build();
@@ -461,6 +465,7 @@ private void mockEventInteractions() {
461465
when(mockEvent.getApp()).thenReturn(mockEventApp);
462466
when(mockEventApp.toBuilder()).thenReturn(mockEventAppBuilder);
463467
when(mockEventAppBuilder.setCustomAttributes(any())).thenReturn(mockEventAppBuilder);
468+
when(mockEventAppBuilder.setInternalKeys(any())).thenReturn(mockEventAppBuilder);
464469
when(mockEventAppBuilder.build()).thenReturn(mockEventApp);
465470
when(dataCapture.captureEventData(
466471
any(Throwable.class),

0 commit comments

Comments
 (0)