use of org.jabref.gui.util.CurrentThreadTaskExecutor in project jabref by JabRef.
the class GroupNodeViewModelTest method setUp.
@Before
public void setUp() throws Exception {
stateManager = mock(StateManager.class);
when(stateManager.getSelectedEntries()).thenReturn(FXCollections.emptyObservableList());
databaseContext = new BibDatabaseContext();
taskExecutor = new CurrentThreadTaskExecutor();
viewModel = getViewModelForGroup(new WordKeywordGroup("Test group", GroupHierarchyType.INDEPENDENT, "test", "search", true, ',', false));
}
use of org.jabref.gui.util.CurrentThreadTaskExecutor in project jabref by JabRef.
the class GroupTreeViewModelTest method setUp.
@Before
public void setUp() throws Exception {
databaseContext = new BibDatabaseContext();
stateManager = new StateManager();
stateManager.activeDatabaseProperty().setValue(Optional.of(databaseContext));
taskExecutor = new CurrentThreadTaskExecutor();
groupTree = new GroupTreeViewModel(stateManager, mock(DialogService.class), taskExecutor);
}
use of org.jabref.gui.util.CurrentThreadTaskExecutor 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