@Test public void handleLoadFileTest() throws Exception { doNothing().when(presenter).loadTab(any(Path.class)); final Path path = mock(Path.class); when(view.chooseFile()).thenReturn(path); presenter.handleLoadFile(); verify(presenter).loadTab(same(path)); }
public void handleLoadFile() { final Path path = view.chooseFile(); if (path == null) return; MainWindowPresenter window = this; if (tracePresenter != null) { window = windowFactory.createWindow(); if (window == null) return; } window.loadTab(path); }
MainWindowPresenter extends BasePresenter<MainWindowView> { public void handleLoadFile() { final Path path = view.chooseFile(); if (path == null) return; MainWindowPresenter window = this; if (tracePresenter != null) { window = windowFactory.createWindow(); if (window == null) return; } window.loadTab(path); } }
MainWindowPresenter extends BasePresenter<MainWindowView> { public void handleLoadFile() { final Path path = view.chooseFile(); if (path == null) return; MainWindowPresenter window = this; if (tracePresenter != null) { window = windowFactory.createWindow(); if (window == null) return; } window.loadTab(path); } MainWindowPresenter(final MainWindowFactory windowFactory,
        final GuiTaskRunner taskRunner, final ZipTraceDbFactory factory); }
MainWindowPresenter extends BasePresenter<MainWindowView> { public void handleLoadFile() { final Path path = view.chooseFile(); if (path == null) return; MainWindowPresenter window = this; if (tracePresenter != null) { window = windowFactory.createWindow(); if (window == null) return; } window.loadTab(path); } MainWindowPresenter(final MainWindowFactory windowFactory,
        final GuiTaskRunner taskRunner, final ZipTraceDbFactory factory); @Override void load(); void handleCloseWindow(); void handleNewWindow(); void handleLoadFile(); }
MainWindowPresenter extends BasePresenter<MainWindowView> { public void handleLoadFile() { final Path path = view.chooseFile(); if (path == null) return; MainWindowPresenter window = this; if (tracePresenter != null) { window = windowFactory.createWindow(); if (window == null) return; } window.loadTab(path); } MainWindowPresenter(final MainWindowFactory windowFactory,
        final GuiTaskRunner taskRunner, final ZipTraceDbFactory factory); @Override void load(); void handleCloseWindow(); void handleNewWindow(); void handleLoadFile();  }