Only disable move to file dir when path equals#7269
Merged
Siedlerchr merged 3 commits intomasterfrom Dec 30, 2020
Merged
Conversation
Fix equals in path method Fixes #7194
tobiasdiez
requested changes
Dec 29, 2020
| void isNotSamePath() { | ||
| linkedFile = new LinkedFile("desc", tempFile, "pdf"); | ||
| databaseContext = mock(BibDatabaseContext.class); | ||
| when(filePreferences.getFileNamePattern()).thenReturn("[citationkey]"); // use this variant, as we cannot mock the linkedFileHandler cause it's initialized inside the viewModel |
Member
There was a problem hiding this comment.
If it's hard to write tests, then it's a good indication that some refactoring should be done. Indeed, we use the mvvm pattern to make testing easy. Could you thus please add a constructor in the viewmodel that accepts a linkedFileHandler .
Member
Author
There was a problem hiding this comment.
Actually, it's just the comment which is obsolete here, as the linkedFilesHandler is not required and can be tested separately (and already is). Would need the same mocking, so no difference.
tobiasdiez
approved these changes
Dec 29, 2020
Siedlerchr
added a commit
that referenced
this pull request
Dec 30, 2020
* upstream/master: (201 commits) Only disable move to file dir when path equals (#7269) Improved detection of long DOI's within text (#7260) Add missing author and fix name Fix style of highlighted checkboxes while searching in preferences (#7258) Updates to institution citation keys (#7210) Bump xmlunit-core from 2.8.1 to 2.8.2 (#7251) Bump classgraph from 4.8.97 to 4.8.98 (#7250) Bump bcprov-jdk15on from 1.67 to 1.68 (#7249) Bump xmlunit-matchers from 2.8.1 to 2.8.2 (#7252) Bump unirest-java from 3.11.06 to 3.11.09 (#7254) Bump org.beryx.jlink from 2.23.0 to 2.23.1 (#7253) Bump pascalgn/automerge-action from v0.12.0 to v0.13.0 (#7255) Added a check to integrate with the flatpak package (#7248) New translations JabRef_en.properties (Chinese Traditional) (#7247) Update code-howtos.md GitBook: [master] 5 pages and 25 assets modified New Crowdin updates (#7246) add language mapping for chinese remove chinese content fix hamcrest link ... # Conflicts: # src/main/java/org/jabref/gui/JabRefFrame.java # src/main/java/org/jabref/gui/dialogs/AutosaveUiManager.java # src/main/java/org/jabref/gui/exporter/SaveAction.java # src/main/java/org/jabref/gui/exporter/SaveDatabaseAction.java # src/main/java/org/jabref/logic/autosaveandbackup/BackupManager.java # src/test/java/org/jabref/gui/exporter/SaveDatabaseActionTest.java
Siedlerchr
added a commit
that referenced
this pull request
Jan 1, 2021
* updateGradle7: (39 commits) try upgrading gradle Only disable move to file dir when path equals (#7269) Improved detection of long DOI's within text (#7260) Add missing author and fix name Fix style of highlighted checkboxes while searching in preferences (#7258) Updates to institution citation keys (#7210) Bump xmlunit-core from 2.8.1 to 2.8.2 (#7251) Bump classgraph from 4.8.97 to 4.8.98 (#7250) Bump bcprov-jdk15on from 1.67 to 1.68 (#7249) Bump xmlunit-matchers from 2.8.1 to 2.8.2 (#7252) Bump unirest-java from 3.11.06 to 3.11.09 (#7254) Bump org.beryx.jlink from 2.23.0 to 2.23.1 (#7253) Bump pascalgn/automerge-action from v0.12.0 to v0.13.0 (#7255) Added a check to integrate with the flatpak package (#7248) New translations JabRef_en.properties (Chinese Traditional) (#7247) Update code-howtos.md GitBook: [master] 5 pages and 25 assets modified New Crowdin updates (#7246) add language mapping for chinese remove chinese content ...
Siedlerchr
added a commit
that referenced
this pull request
Jan 3, 2021
* upstream/master: fix checsktyle Fix for application dialogs opening in wrong displays (#7273) Only disable move to file dir when path equals (#7269) Improved detection of long DOI's within text (#7260) Add missing author and fix name Fix style of highlighted checkboxes while searching in preferences (#7258) Updates to institution citation keys (#7210) Bump xmlunit-core from 2.8.1 to 2.8.2 (#7251) Bump classgraph from 4.8.97 to 4.8.98 (#7250) Bump bcprov-jdk15on from 1.67 to 1.68 (#7249) Bump xmlunit-matchers from 2.8.1 to 2.8.2 (#7252) Bump unirest-java from 3.11.06 to 3.11.09 (#7254) Bump org.beryx.jlink from 2.23.0 to 2.23.1 (#7253) Bump pascalgn/automerge-action from v0.12.0 to v0.13.0 (#7255) # Conflicts: # src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix equals in path method
Fixes #7194
The dialog is now only disable when the file is already in the file directory