@Test public void loadTabTest() throws Exception { final Path path = mock(Path.class); final TracePresenter tracePresenter = mock(TracePresenter.class); doReturn(tracePresenter).when(presenter).createPresenter(same(path)); presenter.loadTab(path); verify(presenter).attachPresenter(same(tracePresenter)); }
@VisibleForTesting void loadTab(final Path path) { taskRunner.computeOrFail( () -> createPresenter(path), this::attachPresenter, this::handleLoadError ); }
MainWindowPresenter extends BasePresenter<MainWindowView> { @VisibleForTesting void loadTab(final Path path) { taskRunner.computeOrFail( () -> createPresenter(path), this::attachPresenter, this::handleLoadError ); } }
MainWindowPresenter extends BasePresenter<MainWindowView> { @VisibleForTesting void loadTab(final Path path) { taskRunner.computeOrFail( () -> createPresenter(path), this::attachPresenter, this::handleLoadError ); } MainWindowPresenter(final MainWindowFactory windowFactory,
        final GuiTaskRunner taskRunner, final ZipTraceDbFactory factory); }
MainWindowPresenter extends BasePresenter<MainWindowView> { @VisibleForTesting void loadTab(final Path path) { taskRunner.computeOrFail( () -> createPresenter(path), this::attachPresenter, this::handleLoadError ); } MainWindowPresenter(final MainWindowFactory windowFactory,
        final GuiTaskRunner taskRunner, final ZipTraceDbFactory factory); @Override void load(); void handleCloseWindow(); void handleNewWindow(); void handleLoadFile(); }
MainWindowPresenter extends BasePresenter<MainWindowView> { @VisibleForTesting void loadTab(final Path path) { taskRunner.computeOrFail( () -> createPresenter(path), this::attachPresenter, this::handleLoadError ); } MainWindowPresenter(final MainWindowFactory windowFactory,
        final GuiTaskRunner taskRunner, final ZipTraceDbFactory factory); @Override void load(); void handleCloseWindow(); void handleNewWindow(); void handleLoadFile();  }