@Test public void testOnExternalLinkDeleted() { final DocumentationLinks value = mock(DocumentationLinks.class); final DMNExternalLink externalLink = mock(DMNExternalLink.class); final List<DMNExternalLink> links = new ArrayList<>(); links.add(externalLink); when(value.getLinks()).thenReturn(links); widget.setValue(value); widget.onExternalLinkDeleted(externalLink); assertFalse(links.contains(externalLink)); verify(widget).refresh(); verify(locker).fire(any()); }
void onExternalLinkDeleted(final DMNExternalLink externalLink) { locker.fire(new LockRequiredEvent()); getValue().getLinks().remove(externalLink); refresh(); }
DocumentationLinksWidget extends Composite implements HasValue<DocumentationLinks>,
                                                                   HasEnabled { void onExternalLinkDeleted(final DMNExternalLink externalLink) { locker.fire(new LockRequiredEvent()); getValue().getLinks().remove(externalLink); refresh(); } }
DocumentationLinksWidget extends Composite implements HasValue<DocumentationLinks>,
                                                                   HasEnabled { void onExternalLinkDeleted(final DMNExternalLink externalLink) { locker.fire(new LockRequiredEvent()); getValue().getLinks().remove(externalLink); refresh(); } @Inject  DocumentationLinksWidget(final ManagedInstance<DocumentationLinkItem> listItems,
                                    final TranslationService translationService,
                                    final HTMLDivElement linksContainer,
                                    final HTMLDivElement noneContainer,
                                    final HTMLAnchorElement addButton,
                                    final NameAndUrlPopoverView.Presenter nameAndUrlPopover,
                                    final CellEditorControlsView cellEditor,
                                    @Named("span") final HTMLElement addLink,
                                    @Named("span") final HTMLElement noLink,
                                    final Event<LockRequiredEvent> locker,
                                    final @DMNEditor ReadOnlyProvider readOnlyProvider); }
DocumentationLinksWidget extends Composite implements HasValue<DocumentationLinks>,
                                                                   HasEnabled { void onExternalLinkDeleted(final DMNExternalLink externalLink) { locker.fire(new LockRequiredEvent()); getValue().getLinks().remove(externalLink); refresh(); } @Inject  DocumentationLinksWidget(final ManagedInstance<DocumentationLinkItem> listItems,
                                    final TranslationService translationService,
                                    final HTMLDivElement linksContainer,
                                    final HTMLDivElement noneContainer,
                                    final HTMLAnchorElement addButton,
                                    final NameAndUrlPopoverView.Presenter nameAndUrlPopover,
                                    final CellEditorControlsView cellEditor,
                                    @Named("span") final HTMLElement addLink,
                                    @Named("span") final HTMLElement noLink,
                                    final Event<LockRequiredEvent> locker,
                                    final @DMNEditor ReadOnlyProvider readOnlyProvider); @PostConstruct void init(); @Override DocumentationLinks getValue(); @Override void setValue(final DocumentationLinks documentationLinks); @Override void setValue(final DocumentationLinks documentationLinks,
                         final boolean fireEvents); @EventHandler("add-button") @SuppressWarnings("unused") void onClickTypeButton(final ClickEvent clickEvent); @Override HandlerRegistration addValueChangeHandler(final ValueChangeHandler<DocumentationLinks> handler); @Override boolean isEnabled(); @Override void setEnabled(final boolean enabled); void setDMNModel(final DRGElement model); }
DocumentationLinksWidget extends Composite implements HasValue<DocumentationLinks>,
                                                                   HasEnabled { void onExternalLinkDeleted(final DMNExternalLink externalLink) { locker.fire(new LockRequiredEvent()); getValue().getLinks().remove(externalLink); refresh(); } @Inject  DocumentationLinksWidget(final ManagedInstance<DocumentationLinkItem> listItems,
                                    final TranslationService translationService,
                                    final HTMLDivElement linksContainer,
                                    final HTMLDivElement noneContainer,
                                    final HTMLAnchorElement addButton,
                                    final NameAndUrlPopoverView.Presenter nameAndUrlPopover,
                                    final CellEditorControlsView cellEditor,
                                    @Named("span") final HTMLElement addLink,
                                    @Named("span") final HTMLElement noLink,
                                    final Event<LockRequiredEvent> locker,
                                    final @DMNEditor ReadOnlyProvider readOnlyProvider); @PostConstruct void init(); @Override DocumentationLinks getValue(); @Override void setValue(final DocumentationLinks documentationLinks); @Override void setValue(final DocumentationLinks documentationLinks,
                         final boolean fireEvents); @EventHandler("add-button") @SuppressWarnings("unused") void onClickTypeButton(final ClickEvent clickEvent); @Override HandlerRegistration addValueChangeHandler(final ValueChangeHandler<DocumentationLinks> handler); @Override boolean isEnabled(); @Override void setEnabled(final boolean enabled); void setDMNModel(final DRGElement model);  }