@Test public void testOnArchiveActiveModule() throws Exception { final Path rootModulePath = mock(Path.class); final POM pom = mock(POM.class); when(pom.getName()).thenReturn("my module"); final Module module = new Module(rootModulePath, mock(Path.class), pom); when(context.getActiveModule()).thenReturn(Optional.of(module)); menu.onArchiveActiveProject(); verify(view).archive(rootModulePath); }
public void onArchiveActiveProject() { view.archive(context.getActiveModule() .map(module -> module.getRootPath()) .orElseThrow(() -> new IllegalStateException("Cannot get root path without active module."))); }
ExplorerMenu { public void onArchiveActiveProject() { view.archive(context.getActiveModule() .map(module -> module.getRootPath()) .orElseThrow(() -> new IllegalStateException("Cannot get root path without active module."))); } }
ExplorerMenu { public void onArchiveActiveProject() { view.archive(context.getActiveModule() .map(module -> module.getRootPath()) .orElseThrow(() -> new IllegalStateException("Cannot get root path without active module."))); } ExplorerMenu(); @Inject  ExplorerMenu(final ExplorerMenuView view,
                        final ActiveContextOptions activeOptions,
                        final WorkspaceProjectContext projectContext); }
ExplorerMenu { public void onArchiveActiveProject() { view.archive(context.getActiveModule() .map(module -> module.getRootPath()) .orElseThrow(() -> new IllegalStateException("Cannot get root path without active module."))); } ExplorerMenu(); @Inject  ExplorerMenu(final ExplorerMenuView view,
                        final ActiveContextOptions activeOptions,
                        final WorkspaceProjectContext projectContext); Menus asMenu(); void refresh(); void addRefreshCommand(Command refreshCommand); void addUpdateCommand(Command updateCommand); void onBusinessViewSelected(); void onTechViewSelected(); void onTreeExplorerSelected(); void onBreadCrumbExplorerSelected(); void onShowTagFilterSelected(); void onArchiveActiveProject(); void onArchiveActiveRepository(); void onRefresh(); }
ExplorerMenu { public void onArchiveActiveProject() { view.archive(context.getActiveModule() .map(module -> module.getRootPath()) .orElseThrow(() -> new IllegalStateException("Cannot get root path without active module."))); } ExplorerMenu(); @Inject  ExplorerMenu(final ExplorerMenuView view,
                        final ActiveContextOptions activeOptions,
                        final WorkspaceProjectContext projectContext); Menus asMenu(); void refresh(); void addRefreshCommand(Command refreshCommand); void addUpdateCommand(Command updateCommand); void onBusinessViewSelected(); void onTechViewSelected(); void onTreeExplorerSelected(); void onBreadCrumbExplorerSelected(); void onShowTagFilterSelected(); void onArchiveActiveProject(); void onArchiveActiveRepository(); void onRefresh();  }