Skip to content

Commit

Permalink
Use "List.of()"
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed May 4, 2023
1 parent 664b015 commit 39786e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/java/org/jabref/gui/search/GlobalSearchBarTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void recordingSearchQueriesOnFocusLostOnly(FxRobot robot) throws InterruptedExce
List<String> lastSearchHistory = stateManager.getWholeSearchHistory().stream().toList();

assertFalse(lastSearchHistory.isEmpty());
assertEquals(FXCollections.observableArrayList("Smith"), lastSearchHistory);
assertEquals(List.of("Smith"), lastSearchHistory);
}

@Test
Expand All @@ -107,6 +107,6 @@ void emptyQueryIsNotRecorded(FxRobot robot) {
DefaultTaskExecutor.runAndWaitInJavaFXThread(() -> hBox.requestFocus());
List<String> lastSearchHistory = stateManager.getWholeSearchHistory().stream().toList();

assertTrue(lastSearchHistory.isEmpty());
assertEquals(List.of(), lastSearchHistory);
}
}

0 comments on commit 39786e4

Please sign in to comment.