use of io.github.vocabhunter.test.utils.TestFileManager in project VocabHunter by VocabHunter.
the class FileListManagerTest method setUp.
@BeforeEach
public void setUp() throws Exception {
files = new TestFileManager(getClass());
Path settingsFile = files.addFile(SETTINGS_JSON);
target = new FileListManagerImpl(settingsFile);
Path path1 = files.addFile("file1");
file1 = new SessionListedFile(path1, true);
Path path2 = files.addFile("file2");
file2 = new DocumentListedFile(path2);
Path path3 = files.addFile("file3");
file3 = new ExcelListedFile(path3, Arrays.asList(1, 2, 3));
}
use of io.github.vocabhunter.test.utils.TestFileManager in project VocabHunter by VocabHunter.
the class GuiTest method setUp.
@BeforeEach
public void setUp() throws Exception {
when(environmentManager.useSystemMenuBar()).thenReturn(false);
when(environmentManager.isExitOptionShown()).thenReturn(true);
when(placementManager.getMainWindow()).thenReturn(new Placement(WINDOW_WIDTH, WINDOW_HEIGHT));
manager = new TestFileManager(getClass());
Path settingsFile = manager.addFile(SettingsManagerImpl.SETTINGS_JSON);
SettingsManager settingsManager = new SettingsManagerImpl(settingsFile);
Path fileListManagerFile = manager.addFile(FileListManagerImpl.SETTINGS_JSON);
FileListManager fileListManager = new FileListManagerImpl(fileListManagerFile);
CoreGuiModule coreModule = new CoreGuiModule();
Module testModule = new AbstractModule() {
@Override
protected void configure() {
bind(SettingsManager.class).toInstance(settingsManager);
bind(FileListManager.class).toInstance(fileListManager);
bind(FileDialogueFactory.class).toInstance(fileDialogueFactory);
bind(EnvironmentManager.class).toInstance(environmentManager);
bind(PlacementManager.class).toInstance(placementManager);
bind(WebPageTool.class).toInstance(webPageTool);
bind(GuiTaskHandler.class).to(GuiTaskHandlerForTesting.class);
}
};
VocabHunterGuiExecutable.setModules(coreModule, testModule, new StandardEventSourceModule());
setupApplication(VocabHunterGuiExecutable.class);
}
use of io.github.vocabhunter.test.utils.TestFileManager in project VocabHunter by VocabHunter.
the class SettingsManagerTest method setUp.
@BeforeEach
public void setUp() throws Exception {
files = new TestFileManager(getClass());
Path settingsFile = files.addFile(SETTINGS_JSON);
dummyPath = files.addFile("dummy");
target = new SettingsManagerImpl(settingsFile);
}
use of io.github.vocabhunter.test.utils.TestFileManager in project VocabHunter by VocabHunter.
the class FileToolTest method setUp.
@BeforeEach
public void setUp() throws Exception {
manager = new TestFileManager(getClass());
base = manager.getDirectory();
existingFile = manager.addFile("existingFile");
Files.createFile(existingFile);
newFile = manager.addFile("newFile");
subDirectory = manager.addFile("directory");
Files.createDirectories(subDirectory);
}
use of io.github.vocabhunter.test.utils.TestFileManager in project VocabHunter by VocabHunter.
the class SelectionExportToolTest method setUp.
@BeforeEach
public void setUp() throws Exception {
files = new TestFileManager(getClass());
file = files.addFile("export.txt");
}
Aggregations