@Test public void testOnSettingCurrentDMNDiagramWhenIsGlobal() { when(dmnDiagramsSession.isGlobalGraphSelected()).thenReturn(true); drdNameChangerView.onSettingCurrentDMNDiagramElement(dmnDiagramSelected); verify(dmnDiagramsSession, times(2)).isGlobalGraphSelected(); }
void onSettingCurrentDMNDiagramElement(final @Observes DMNDiagramSelected selected) { if (dmnDiagramsSession.isGlobalGraphSelected()) { hideDRDNameChanger(); } else { this.drdName.setText(selected.getDiagramElement().getName().getValue()); editMode.getStyle().setDisplay(NONE); viewMode.getStyle().setDisplay(BLOCK); showDRDNameChanger(); } }
DRDNameChangerView implements DRDNameChanger { void onSettingCurrentDMNDiagramElement(final @Observes DMNDiagramSelected selected) { if (dmnDiagramsSession.isGlobalGraphSelected()) { hideDRDNameChanger(); } else { this.drdName.setText(selected.getDiagramElement().getName().getValue()); editMode.getStyle().setDisplay(NONE); viewMode.getStyle().setDisplay(BLOCK); showDRDNameChanger(); } } }
DRDNameChangerView implements DRDNameChanger { void onSettingCurrentDMNDiagramElement(final @Observes DMNDiagramSelected selected) { if (dmnDiagramsSession.isGlobalGraphSelected()) { hideDRDNameChanger(); } else { this.drdName.setText(selected.getDiagramElement().getName().getValue()); editMode.getStyle().setDisplay(NONE); viewMode.getStyle().setDisplay(BLOCK); showDRDNameChanger(); } } @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 onSettingCurrentDMNDiagramElement(final @Observes DMNDiagramSelected selected) { if (dmnDiagramsSession.isGlobalGraphSelected()) { hideDRDNameChanger(); } else { this.drdName.setText(selected.getDiagramElement().getName().getValue()); editMode.getStyle().setDisplay(NONE); viewMode.getStyle().setDisplay(BLOCK); showDRDNameChanger(); } } @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 onSettingCurrentDMNDiagramElement(final @Observes DMNDiagramSelected selected) { if (dmnDiagramsSession.isGlobalGraphSelected()) { hideDRDNameChanger(); } else { this.drdName.setText(selected.getDiagramElement().getName().getValue()); editMode.getStyle().setDisplay(NONE); viewMode.getStyle().setDisplay(BLOCK); showDRDNameChanger(); } } @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();  }