Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MatkovIvan committed Jan 28, 2019
1 parent e6dfc91 commit 5ad4566
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ public void clearFailed() {

@Test
public void closeFailed() {
SQLiteOpenHelper helperMock = mock(SQLiteOpenHelper.class);
doThrow(new RuntimeException()).when(helperMock).close();
DatabaseManager databaseManagerMock = getDatabaseManagerMock();
databaseManagerMock.setSQLiteOpenHelper(helperMock);
databaseManagerMock.close();
verifyStatic();
AppCenterLog.error(eq(AppCenter.LOG_TAG), anyString(), any(RuntimeException.class));
Expand Down

0 comments on commit 5ad4566

Please sign in to comment.