use of org.jabref.preferences.PreferencesService in project jabref by JabRef.
the class ManageJournalAbbreviationsViewModelTest method setUpViewModel.
@Before
public void setUpViewModel() throws Exception {
abbreviationPreferences = mock(JournalAbbreviationPreferences.class);
PreferencesService preferences = mock(PreferencesService.class);
when(preferences.getJournalAbbreviationPreferences()).thenReturn(abbreviationPreferences);
dialogService = mock(DialogService.class);
TaskExecutor taskExecutor = new CurrentThreadTaskExecutor();
JournalAbbreviationLoader journalAbbreviationLoader = mock(JournalAbbreviationLoader.class);
viewModel = new ManageJournalAbbreviationsViewModel(preferences, dialogService, taskExecutor, journalAbbreviationLoader);
emptyTestFile = createTemporaryTestFile("emptyTestFile.txt", "");
testFile1Entries = createTemporaryTestFile("testFile1Entries.txt", "Test Entry = TE" + NEWLINE + "");
testFile3Entries = createTemporaryTestFile("testFile3Entries.txt", "Abbreviations = Abb" + NEWLINE + "Test Entry = TE" + NEWLINE + "MoreEntries = ME" + NEWLINE + "");
testFile4Entries = createTemporaryTestFile("testFile4Entries.txt", "Abbreviations = Abb" + NEWLINE + "Test Entry = TE" + NEWLINE + "MoreEntries = ME" + NEWLINE + "Entry = E" + NEWLINE + "");
testFile5EntriesWithDuplicate = createTemporaryTestFile("testFile5Entries.txt", "Abbreviations = Abb" + NEWLINE + "Test Entry = TE" + NEWLINE + "Test Entry = TE" + NEWLINE + "MoreEntries = ME" + NEWLINE + "EntryEntry = EE" + NEWLINE + "");
}
Aggregations