Skip to content

Commit

Permalink
Hotfix of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Mar 16, 2020
1 parent c7e399c commit 10f5468
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void saveSelectedAsPlain() {
* successful save.
* @return true on successful save
*/
private boolean saveAs(Path file, SaveDatabaseMode mode) {
boolean saveAs(Path file, SaveDatabaseMode mode) {
BibDatabaseContext context = panel.getBibDatabaseContext();

// Close AutosaveManager and BackupManager for original library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void saveShouldShowSaveAsIfDatabaseNotSelected() {
when(dialogService.showFileSaveDialog(any())).thenReturn(Optional.of(file));
doReturn(true).when(saveDatabaseAction).saveAs(any(), any());

saveDatabaseAction.save(dbContext);
saveDatabaseAction.save();

verify(saveDatabaseAction, times(1)).saveAs(file, SaveDatabaseAction.SaveDatabaseMode.NORMAL);
}
Expand Down Expand Up @@ -140,7 +140,7 @@ public void saveKeepsChangedFlag() throws Exception {
BibDatabase database = new BibDatabase(List.of(firstEntry, secondEntry));

saveDatabaseAction = createSaveDatabaseActionForBibDatabase(database);
saveDatabaseAction.save(dbContext);
saveDatabaseAction.save();

assertEquals(database
.getEntries().stream()
Expand All @@ -151,7 +151,7 @@ public void saveKeepsChangedFlag() throws Exception {
@Test
public void saveShouldNotSaveDatabaseIfPathNotSet() {
when(dbContext.getDatabasePath()).thenReturn(Optional.empty());
boolean result = saveDatabaseAction.save(dbContext);
boolean result = saveDatabaseAction.save();
assertFalse(result);
}
}

0 comments on commit 10f5468

Please sign in to comment.