Skip to content

Commit

Permalink
Test to check adding null records
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartosz Litwiniuk committed Nov 2, 2023
1 parent f2d2c04 commit 2de2d76
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@ public void tryDeleteNotExistingRecordFromDatabaseContext() {
assertEquals(3, databaseContext.count());
}

@Test(expected = NullPointerException.class)
public void tryAddNullBacktraceData() {
databaseContext.add((BacktraceData) null);
}

@Test(expected = NullPointerException.class)
public void tryAddNullBacktraceDbRecord() {
databaseContext.add((BacktraceDatabaseRecord) null);
}

private List<BacktraceDatabaseRecord> fillDatabase() {
List<BacktraceDatabaseRecord> result = new ArrayList<>();
BacktraceReport report = new BacktraceReport(this.testMessage);
Expand Down

0 comments on commit 2de2d76

Please sign in to comment.