@Test public void setupWithPermissionTest() { doReturn(true).when(shortcutHelper).authorize("perspectiveIdentifier"); presenter.setup(new HomeShortcutLink("label", "perspectiveIdentifier")); verify(view).setLabel("label"); verify(view, never()).disable(); }
public void setup(final HomeShortcutLink link) { this.link = link; view.setLabel(link.getLabel()); if (!shortcutHelper.authorize(link.getPerspectiveIdentifier())) { view.disable(); } }
ShortcutSubHeadingLinkPresenter { public void setup(final HomeShortcutLink link) { this.link = link; view.setLabel(link.getLabel()); if (!shortcutHelper.authorize(link.getPerspectiveIdentifier())) { view.disable(); } } }
ShortcutSubHeadingLinkPresenter { public void setup(final HomeShortcutLink link) { this.link = link; view.setLabel(link.getLabel()); if (!shortcutHelper.authorize(link.getPerspectiveIdentifier())) { view.disable(); } } @Inject  ShortcutSubHeadingLinkPresenter(final View view,
                                           final ShortcutHelper shortcutHelper); }
ShortcutSubHeadingLinkPresenter { public void setup(final HomeShortcutLink link) { this.link = link; view.setLabel(link.getLabel()); if (!shortcutHelper.authorize(link.getPerspectiveIdentifier())) { view.disable(); } } @Inject  ShortcutSubHeadingLinkPresenter(final View view,
                                           final ShortcutHelper shortcutHelper); @PostConstruct void init(); void setup(final HomeShortcutLink link); View getView(); }
ShortcutSubHeadingLinkPresenter { public void setup(final HomeShortcutLink link) { this.link = link; view.setLabel(link.getLabel()); if (!shortcutHelper.authorize(link.getPerspectiveIdentifier())) { view.disable(); } } @Inject  ShortcutSubHeadingLinkPresenter(final View view,
                                           final ShortcutHelper shortcutHelper); @PostConstruct void init(); void setup(final HomeShortcutLink link); View getView();  }