Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailSuendukov committed Dec 19, 2023
1 parent fd89cde commit 3d49161
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1366,12 +1366,15 @@ public ManagedErrorLog answer(InvocationOnMock invocation) {
ManagedErrorLog log = mock(ManagedErrorLog.class);
when(log.getId()).thenReturn(UUID.randomUUID());
when(log.getException()).thenReturn(exception);
when(log.getTimestamp()).thenReturn(new Date());
return log;
}
});
when(logSerializer.serializeLog(any(Log.class))).thenReturn(jsonCrash);
when(SharedPreferencesManager.getBoolean(CRASHES_ENABLED_KEY, true)).thenReturn(true);

ErrorAttachmentLog errorAttachmentLog = mock(ErrorAttachmentLog.class);
when(ErrorAttachmentLog.attachmentWithBinary(any(), anyString(), anyString())).thenReturn(mock(ErrorAttachmentLog.class));
whenNew(ErrorAttachmentLog.class).withAnyArguments().thenReturn(errorAttachmentLog);

/* Start crashes. */
Expand Down

0 comments on commit 3d49161

Please sign in to comment.