@Test public void setupPopupPresenterFailedWithoutValues() { when(factMappingValueMock.getRawValue()).thenReturn(null); when(factMappingValueMock.getErrorValue()).thenReturn(null); mouseMoveHandler.setupPopupPresenter(factMappingValueMock, ROW_INDEX, COLUMN_INDEX, DX, DY, PopoverView.Position.RIGHT); verify(errorReportPopupPresenterMock, times(1)).setup( eq(ScenarioSimulationEditorConstants.INSTANCE.errorReason()), eq(ScenarioSimulationEditorConstants.INSTANCE.errorPopoverMessageFailedWithError(NULL, NULL)), eq(ScenarioSimulationEditorConstants.INSTANCE.keep()), eq(ScenarioSimulationEditorConstants.INSTANCE.apply()), isA(Command.class), eq(DX), eq(DY), eq(PopoverView.Position.RIGHT)); }
protected void setupPopupPresenter(final FactMappingValue toManage, final int uiRowIndex, final int uiColumnIndex, final int xPosition,final int yPosition,final PopoverView.Position position) { final Object expectedValue = toManage.getRawValue(); final Object errorValue = toManage.getErrorValue(); if (FactMappingValueStatus.FAILED_WITH_ERROR == toManage.getStatus()) { errorReportPopupPresenter.setup(ScenarioSimulationEditorConstants.INSTANCE.errorReason(), ScenarioSimulationEditorConstants.INSTANCE.errorPopoverMessageFailedWithError( expectedValue != null ? expectedValue.toString() : NULL, errorValue != null ? errorValue.toString() : NULL), ScenarioSimulationEditorConstants.INSTANCE.keep(), ScenarioSimulationEditorConstants.INSTANCE.apply(), () -> scenarioGrid.getEventBus().fireEvent( new SetGridCellValueEvent(scenarioGrid.getGridWidget(), uiRowIndex, uiColumnIndex, errorValue != null ? errorValue.toString() : NULL)), xPosition, yPosition, position); } else { errorReportPopupPresenter.setup(ScenarioSimulationEditorConstants.INSTANCE.errorReason(), ScenarioSimulationEditorConstants.INSTANCE.errorPopoverMessageFailedWithException( toManage.getExceptionMessage()), ScenarioSimulationEditorConstants.INSTANCE.close(), xPosition, yPosition, position); } }
ScenarioSimulationMainGridPanelMouseMoveHandler extends AbstractScenarioSimulationGridPanelHandler implements ScenarioSimulationGridPanelMouseMoveHandler { protected void setupPopupPresenter(final FactMappingValue toManage, final int uiRowIndex, final int uiColumnIndex, final int xPosition,final int yPosition,final PopoverView.Position position) { final Object expectedValue = toManage.getRawValue(); final Object errorValue = toManage.getErrorValue(); if (FactMappingValueStatus.FAILED_WITH_ERROR == toManage.getStatus()) { errorReportPopupPresenter.setup(ScenarioSimulationEditorConstants.INSTANCE.errorReason(), ScenarioSimulationEditorConstants.INSTANCE.errorPopoverMessageFailedWithError( expectedValue != null ? expectedValue.toString() : NULL, errorValue != null ? errorValue.toString() : NULL), ScenarioSimulationEditorConstants.INSTANCE.keep(), ScenarioSimulationEditorConstants.INSTANCE.apply(), () -> scenarioGrid.getEventBus().fireEvent( new SetGridCellValueEvent(scenarioGrid.getGridWidget(), uiRowIndex, uiColumnIndex, errorValue != null ? errorValue.toString() : NULL)), xPosition, yPosition, position); } else { errorReportPopupPresenter.setup(ScenarioSimulationEditorConstants.INSTANCE.errorReason(), ScenarioSimulationEditorConstants.INSTANCE.errorPopoverMessageFailedWithException( toManage.getExceptionMessage()), ScenarioSimulationEditorConstants.INSTANCE.close(), xPosition, yPosition, position); } } }
ScenarioSimulationMainGridPanelMouseMoveHandler extends AbstractScenarioSimulationGridPanelHandler implements ScenarioSimulationGridPanelMouseMoveHandler { protected void setupPopupPresenter(final FactMappingValue toManage, final int uiRowIndex, final int uiColumnIndex, final int xPosition,final int yPosition,final PopoverView.Position position) { final Object expectedValue = toManage.getRawValue(); final Object errorValue = toManage.getErrorValue(); if (FactMappingValueStatus.FAILED_WITH_ERROR == toManage.getStatus()) { errorReportPopupPresenter.setup(ScenarioSimulationEditorConstants.INSTANCE.errorReason(), ScenarioSimulationEditorConstants.INSTANCE.errorPopoverMessageFailedWithError( expectedValue != null ? expectedValue.toString() : NULL, errorValue != null ? errorValue.toString() : NULL), ScenarioSimulationEditorConstants.INSTANCE.keep(), ScenarioSimulationEditorConstants.INSTANCE.apply(), () -> scenarioGrid.getEventBus().fireEvent( new SetGridCellValueEvent(scenarioGrid.getGridWidget(), uiRowIndex, uiColumnIndex, errorValue != null ? errorValue.toString() : NULL)), xPosition, yPosition, position); } else { errorReportPopupPresenter.setup(ScenarioSimulationEditorConstants.INSTANCE.errorReason(), ScenarioSimulationEditorConstants.INSTANCE.errorPopoverMessageFailedWithException( toManage.getExceptionMessage()), ScenarioSimulationEditorConstants.INSTANCE.close(), xPosition, yPosition, position); } }  }
ScenarioSimulationMainGridPanelMouseMoveHandler extends AbstractScenarioSimulationGridPanelHandler implements ScenarioSimulationGridPanelMouseMoveHandler { protected void setupPopupPresenter(final FactMappingValue toManage, final int uiRowIndex, final int uiColumnIndex, final int xPosition,final int yPosition,final PopoverView.Position position) { final Object expectedValue = toManage.getRawValue(); final Object errorValue = toManage.getErrorValue(); if (FactMappingValueStatus.FAILED_WITH_ERROR == toManage.getStatus()) { errorReportPopupPresenter.setup(ScenarioSimulationEditorConstants.INSTANCE.errorReason(), ScenarioSimulationEditorConstants.INSTANCE.errorPopoverMessageFailedWithError( expectedValue != null ? expectedValue.toString() : NULL, errorValue != null ? errorValue.toString() : NULL), ScenarioSimulationEditorConstants.INSTANCE.keep(), ScenarioSimulationEditorConstants.INSTANCE.apply(), () -> scenarioGrid.getEventBus().fireEvent( new SetGridCellValueEvent(scenarioGrid.getGridWidget(), uiRowIndex, uiColumnIndex, errorValue != null ? errorValue.toString() : NULL)), xPosition, yPosition, position); } else { errorReportPopupPresenter.setup(ScenarioSimulationEditorConstants.INSTANCE.errorReason(), ScenarioSimulationEditorConstants.INSTANCE.errorPopoverMessageFailedWithException( toManage.getExceptionMessage()), ScenarioSimulationEditorConstants.INSTANCE.close(), xPosition, yPosition, position); } }  @Override void onNodeMouseMove(NodeMouseMoveEvent event); @Override void hidePopover(); @Override void setErrorReportPopupPresenter(ErrorReportPopoverPresenter errorReportPopupPresenter); }
ScenarioSimulationMainGridPanelMouseMoveHandler extends AbstractScenarioSimulationGridPanelHandler implements ScenarioSimulationGridPanelMouseMoveHandler { protected void setupPopupPresenter(final FactMappingValue toManage, final int uiRowIndex, final int uiColumnIndex, final int xPosition,final int yPosition,final PopoverView.Position position) { final Object expectedValue = toManage.getRawValue(); final Object errorValue = toManage.getErrorValue(); if (FactMappingValueStatus.FAILED_WITH_ERROR == toManage.getStatus()) { errorReportPopupPresenter.setup(ScenarioSimulationEditorConstants.INSTANCE.errorReason(), ScenarioSimulationEditorConstants.INSTANCE.errorPopoverMessageFailedWithError( expectedValue != null ? expectedValue.toString() : NULL, errorValue != null ? errorValue.toString() : NULL), ScenarioSimulationEditorConstants.INSTANCE.keep(), ScenarioSimulationEditorConstants.INSTANCE.apply(), () -> scenarioGrid.getEventBus().fireEvent( new SetGridCellValueEvent(scenarioGrid.getGridWidget(), uiRowIndex, uiColumnIndex, errorValue != null ? errorValue.toString() : NULL)), xPosition, yPosition, position); } else { errorReportPopupPresenter.setup(ScenarioSimulationEditorConstants.INSTANCE.errorReason(), ScenarioSimulationEditorConstants.INSTANCE.errorPopoverMessageFailedWithException( toManage.getExceptionMessage()), ScenarioSimulationEditorConstants.INSTANCE.close(), xPosition, yPosition, position); } }  @Override void onNodeMouseMove(NodeMouseMoveEvent event); @Override void hidePopover(); @Override void setErrorReportPopupPresenter(ErrorReportPopoverPresenter errorReportPopupPresenter);  }