Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve File Creation Issue With Medline/PubMed #8552

Merged
merged 7 commits into from
Mar 16, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#8455 : Fix another failing test
  • Loading branch information
addak committed Mar 13, 2022
commit 4039011ee6f03f0575a6ae1ec36822f31ae5621f
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ public void getActiveFetcherInstances() throws Exception {
StudyDatabaseToFetcherConverter converter = new StudyDatabaseToFetcherConverter(studyRepository.getActiveLibraryEntries(), importFormatPreferences);
List<SearchBasedFetcher> result = converter.getActiveFetchers();

Assertions.assertEquals(2, result.size());
Assertions.assertEquals(3, result.size());
Assertions.assertEquals(result.get(0).getName(), "Springer");
Assertions.assertEquals(result.get(1).getName(), "ArXiv");
Assertions.assertEquals(result.get(2).getName(), "Medline/PubMed");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, it is better you compare two collections directly, this makes it easier to spot differences in case of failure.
e.g. you have on the one hand:
expectedFetcherNames = LIst.of(.......)
actualFetcherNames = result.stream.map(Fetcher::getName).toCollection...
assertEquals(expectedFetcherNames,

}

private void copyTestStudyDefinitionFileIntoDirectory(Path destination) throws Exception {
Expand Down