@Test public void setupWithNoActionPermissionTest() { doReturn(false).when(shortcutHelper).authorize(any(HomeShortcut.class)); final HomeShortcut shortcut = ModelUtils.makeShortcut("iconCss", "heading", "subHeadingPrefix", mock(Command.class)); presenter.setup(shortcut); verify(view, never()).setAction(shortcut.getOnClickCommand()); }
public void setup(final HomeShortcut shortcut) { setupIcon(shortcut); view.setHeading(shortcut.getHeading()); setupAction(shortcut); setupSubHeading(shortcut); }
ShortcutPresenter { public void setup(final HomeShortcut shortcut) { setupIcon(shortcut); view.setHeading(shortcut.getHeading()); setupAction(shortcut); setupSubHeading(shortcut); } }
ShortcutPresenter { public void setup(final HomeShortcut shortcut) { setupIcon(shortcut); view.setHeading(shortcut.getHeading()); setupAction(shortcut); setupSubHeading(shortcut); } @Inject  ShortcutPresenter(final View view,
                             final ShortcutHelper shortcutHelper,
                             final ManagedInstance<ShortcutSubHeadingLinkPresenter> linkPresenters,
                             final ManagedInstance<ShortcutSubHeadingTextPresenter> textPresenters); }
ShortcutPresenter { public void setup(final HomeShortcut shortcut) { setupIcon(shortcut); view.setHeading(shortcut.getHeading()); setupAction(shortcut); setupSubHeading(shortcut); } @Inject  ShortcutPresenter(final View view,
                             final ShortcutHelper shortcutHelper,
                             final ManagedInstance<ShortcutSubHeadingLinkPresenter> linkPresenters,
                             final ManagedInstance<ShortcutSubHeadingTextPresenter> textPresenters); @PostConstruct void init(); void setup(final HomeShortcut shortcut); View getView(); }
ShortcutPresenter { public void setup(final HomeShortcut shortcut) { setupIcon(shortcut); view.setHeading(shortcut.getHeading()); setupAction(shortcut); setupSubHeading(shortcut); } @Inject  ShortcutPresenter(final View view,
                             final ShortcutHelper shortcutHelper,
                             final ManagedInstance<ShortcutSubHeadingLinkPresenter> linkPresenters,
                             final ManagedInstance<ShortcutSubHeadingTextPresenter> textPresenters); @PostConstruct void init(); void setup(final HomeShortcut shortcut); View getView();  }