Search in sources :

Example 1 with SystemUtils

use of net.sf.latexdraw.util.SystemUtils in project latexdraw by arnobl.

the class ExportTemplateTest method commonCanDoFixture.

@Override
protected void commonCanDoFixture() {
    final SystemUtils utils = Mockito.mock(SystemUtils.class);
    Mockito.when(utils.getPathTemplatesDirUser()).thenReturn("");
    SystemUtils.setSingleton(utils);
    svgGen = Mockito.mock(SVGDocumentGenerator.class);
    ui = Mockito.mock(JfxUI.class);
    statusWidget = Mockito.mock(Label.class);
    progressBar = Mockito.mock(ProgressBar.class);
    templatesPane = Mockito.mock(Pane.class);
    alertName = Mockito.mock(Alert.class);
    inputName = Mockito.mock(TextInputDialog.class);
    cmd = new ExportTemplate(templatesPane, svgGen, ui, progressBar, statusWidget, alertName, inputName);
}
Also used : JfxUI(io.github.interacto.jfx.ui.JfxUI) Label(javafx.scene.control.Label) Alert(javafx.scene.control.Alert) SVGDocumentGenerator(net.sf.latexdraw.view.svg.SVGDocumentGenerator) ProgressBar(javafx.scene.control.ProgressBar) Pane(javafx.scene.layout.Pane) SystemUtils(net.sf.latexdraw.util.SystemUtils) TextInputDialog(javafx.scene.control.TextInputDialog)

Example 2 with SystemUtils

use of net.sf.latexdraw.util.SystemUtils in project latexdraw by arnobl.

the class NewDrawingTest method commonCanDoFixture.

@Override
protected void commonCanDoFixture() {
    final SystemUtils utils = Mockito.mock(SystemUtils.class);
    Mockito.when(utils.getPathTemplatesDirUser()).thenReturn("");
    SystemUtils.setSingleton(utils);
    ui = Mockito.mock(JfxUI.class);
    statusWidget = Mockito.mock(Label.class);
    progressBar = Mockito.mock(ProgressBar.class);
    mainstage = Mockito.mock(Stage.class);
    file = Mockito.mock(File.class);
    modifiedAlert = Mockito.mock(Alert.class);
    openSaveManager = Mockito.mock(OpenSaver.class);
    fileChooser = Mockito.mock(FileChooser.class);
    currentFolder = Optional.empty();
    cmd = new NewDrawing(file, openSaveManager, progressBar, statusWidget, ui, fileChooser, currentFolder, mainstage, modifiedAlert);
}
Also used : OpenSaver(io.github.interacto.jfx.ui.OpenSaver) JfxUI(io.github.interacto.jfx.ui.JfxUI) Label(javafx.scene.control.Label) FileChooser(javafx.stage.FileChooser) Stage(javafx.stage.Stage) Alert(javafx.scene.control.Alert) ProgressBar(javafx.scene.control.ProgressBar) File(java.io.File) SystemUtils(net.sf.latexdraw.util.SystemUtils)

Example 3 with SystemUtils

use of net.sf.latexdraw.util.SystemUtils in project latexdraw by arnobl.

the class SaveDrawingTest method commonCanDoFixture.

@Override
protected void commonCanDoFixture() {
    final SystemUtils utils = Mockito.mock(SystemUtils.class);
    Mockito.when(utils.getPathTemplatesDirUser()).thenReturn("");
    SystemUtils.setSingleton(utils);
    ui = Mockito.mock(JfxUI.class);
    statusWidget = Mockito.mock(Label.class);
    progressBar = Mockito.mock(ProgressBar.class);
    mainstage = Mockito.mock(Stage.class);
    file = Mockito.mock(File.class);
    modifiedAlert = Mockito.mock(Alert.class);
    openSaveManager = Mockito.mock(OpenSaver.class);
    fileChooser = Mockito.mock(FileChooser.class);
    currentFolder = Optional.empty();
    injector = Mockito.mock(Injector.class);
    prefService = Mockito.mock(PreferencesService.class);
    Mockito.when(injector.getInstance(PreferencesService.class)).thenReturn(prefService);
    cmd = new SaveDrawing(true, true, currentFolder, fileChooser, injector, file, openSaveManager, progressBar, ui, statusWidget, mainstage, modifiedAlert);
}
Also used : OpenSaver(io.github.interacto.jfx.ui.OpenSaver) JfxUI(io.github.interacto.jfx.ui.JfxUI) Injector(net.sf.latexdraw.util.Injector) Label(javafx.scene.control.Label) FileChooser(javafx.stage.FileChooser) Stage(javafx.stage.Stage) Alert(javafx.scene.control.Alert) ProgressBar(javafx.scene.control.ProgressBar) File(java.io.File) SystemUtils(net.sf.latexdraw.util.SystemUtils) PreferencesService(net.sf.latexdraw.service.PreferencesService)

Example 4 with SystemUtils

use of net.sf.latexdraw.util.SystemUtils in project latexdraw by arnobl.

the class LoadDrawingTest method commonCanDoFixture.

@Override
protected void commonCanDoFixture() {
    final SystemUtils utils = Mockito.mock(SystemUtils.class);
    Mockito.when(utils.getPathTemplatesDirUser()).thenReturn("");
    SystemUtils.setSingleton(utils);
    ui = Mockito.mock(JfxUI.class);
    statusWidget = Mockito.mock(Label.class);
    progressBar = Mockito.mock(ProgressBar.class);
    mainstage = Mockito.mock(Stage.class);
    file = Mockito.mock(File.class);
    modifiedAlert = Mockito.mock(Alert.class);
    openSaveManager = Mockito.mock(OpenSaver.class);
    fileChooser = Mockito.mock(FileChooser.class);
    currentFolder = Optional.empty();
    cmd = new LoadDrawing(file, openSaveManager, progressBar, statusWidget, ui, fileChooser, currentFolder, mainstage, modifiedAlert);
}
Also used : OpenSaver(io.github.interacto.jfx.ui.OpenSaver) JfxUI(io.github.interacto.jfx.ui.JfxUI) Label(javafx.scene.control.Label) FileChooser(javafx.stage.FileChooser) Stage(javafx.stage.Stage) Alert(javafx.scene.control.Alert) ProgressBar(javafx.scene.control.ProgressBar) File(java.io.File) SystemUtils(net.sf.latexdraw.util.SystemUtils)

Aggregations

JfxUI (io.github.interacto.jfx.ui.JfxUI)4 Alert (javafx.scene.control.Alert)4 Label (javafx.scene.control.Label)4 ProgressBar (javafx.scene.control.ProgressBar)4 SystemUtils (net.sf.latexdraw.util.SystemUtils)4 OpenSaver (io.github.interacto.jfx.ui.OpenSaver)3 File (java.io.File)3 FileChooser (javafx.stage.FileChooser)3 Stage (javafx.stage.Stage)3 TextInputDialog (javafx.scene.control.TextInputDialog)1 Pane (javafx.scene.layout.Pane)1 PreferencesService (net.sf.latexdraw.service.PreferencesService)1 Injector (net.sf.latexdraw.util.Injector)1 SVGDocumentGenerator (net.sf.latexdraw.view.svg.SVGDocumentGenerator)1