@Test public void testSaveForTheCurrentDiagram() { when(dmnDiagramsSession.getCurrentDMNDiagramElement()).thenReturn(Optional.of(dmnDiagramElement)); when(dmnDiagramElement.getName()).thenReturn(new Name()); drdNameChangerView.saveForTheCurrentDiagram(); verify(drdNameInput, times(1)).getValue(); verify(selectedEvent, times(1)).fire(any(DMNDiagramSelected.class)); }
void saveForTheCurrentDiagram() { dmnDiagramsSession.getCurrentDMNDiagramElement().ifPresent(this::performSave); }
DRDNameChangerView implements DRDNameChanger { void saveForTheCurrentDiagram() { dmnDiagramsSession.getCurrentDMNDiagramElement().ifPresent(this::performSave); } }
DRDNameChangerView implements DRDNameChanger { void saveForTheCurrentDiagram() { dmnDiagramsSession.getCurrentDMNDiagramElement().ifPresent(this::performSave); } @Inject  DRDNameChangerView(final DMNDiagramsSession dmnDiagramsSession, final Event<DMNDiagramSelected> selectedEvent, final DivElement viewMode, final DivElement editMode, final HTMLAnchorElement returnToDRG, final Span drdName, final InputElement drdNameInput); }
DRDNameChangerView implements DRDNameChanger { void saveForTheCurrentDiagram() { dmnDiagramsSession.getCurrentDMNDiagramElement().ifPresent(this::performSave); } @Inject  DRDNameChangerView(final DMNDiagramsSession dmnDiagramsSession, final Event<DMNDiagramSelected> selectedEvent, final DivElement viewMode, final DivElement editMode, final HTMLAnchorElement returnToDRG, final Span drdName, final InputElement drdNameInput); @Override void setSessionPresenterView(SessionPresenter.View sessionPresenterView); @Override void showDRDNameChanger(); @Override void hideDRDNameChanger(); }
DRDNameChangerView implements DRDNameChanger { void saveForTheCurrentDiagram() { dmnDiagramsSession.getCurrentDMNDiagramElement().ifPresent(this::performSave); } @Inject  DRDNameChangerView(final DMNDiagramsSession dmnDiagramsSession, final Event<DMNDiagramSelected> selectedEvent, final DivElement viewMode, final DivElement editMode, final HTMLAnchorElement returnToDRG, final Span drdName, final InputElement drdNameInput); @Override void setSessionPresenterView(SessionPresenter.View sessionPresenterView); @Override void showDRDNameChanger(); @Override void hideDRDNameChanger();  }