TerminationTreeItemContent implements IsElement { public void setNewValue(TerminationConfigOption terminationConfigOption) { TerminationManager operation = terminationManagerMap.get(terminationConfigOption); if (operation != null) { operation.setNewValue(); } } @Inject  TerminationTreeItemContent(final TerminationTreeItemContentView view,
                                      final TranslationService translationService); TreeItem getTreeItem(); TerminationConfigModel getModel(); TerminationConfigOption getTerminationConfigOption(); void removeDropDownOption(TerminationConfigOption terminationConfigOption); TerminationTreeItemContentView getView(); void setModel(TerminationConfigModel model); void setTerminationConfigOption(TerminationConfigOption terminationConfigOption); void setTreeItem(TreeItem treeItem); void onTerminationTypeSelected(String terminationType); void setTerminationConfigForm(TerminationConfigForm terminationConfigForm); void removeTreeItem(); void onDaysSpentChange(Long value); void onHoursSpentChange(Long value); void onMinutesSpentChange(Long value); void onSecondsSpentChange(Long value); void onMillisecondsSpentChange(Long value); void onUnimprovedDaysSpentChange(Long value); void onUnimprovedHoursSpentChange(Long value); void onUnimprovedMinutesSpentChange(Long value); void onUnimprovedSecondsSpentChange(Long value); void onUnimprovedMillisecondsSpentChange(Long value); void onStepCountLimitChange(Integer value); void onUnimprovedStepCountLimitChange(Integer value); void onScoreCalculationLimitChange(Long value); void onFeasibilityChange(Boolean value); void onBestScoreLimitChange(String value); void onTerminationCompositionStyleChange(TerminationCompositionStyleModel value); void setExistingValue(Object value,
                                 TerminationConfigOption terminationConfigOption); void setNewValue(TerminationConfigOption terminationConfigOption); @Override HTMLElement getElement(); static final long MINUTES_SPENT_DEFAULT_VALUE; static final long UNIMPROVED_MINUTES_SPENT_DEFAULT_VALUE; }
@Test public void setNewTimeSpentValue() { terminationTreeItemContent.setNewValue(TerminationConfigOption.MILLISECONDS_SPENT_LIMIT); verify(view).setMillisecondsSpent(0L); verify(terminationConfigModel).setMillisecondsSpentLimit(0L); verify(view).setSecondsSpent(0L); verify(terminationConfigModel).setSecondsSpentLimit(0L); verify(view).setMinutesSpent(TerminationTreeItemContent.MINUTES_SPENT_DEFAULT_VALUE); verify(terminationConfigModel).setMinutesSpentLimit(TerminationTreeItemContent.MINUTES_SPENT_DEFAULT_VALUE); verify(view).setHoursSpent(0L); verify(terminationConfigModel).setHoursSpentLimit(0L); verify(view).setDaysSpent(0L); verify(terminationConfigModel).setDaysSpentLimit(0L); }
@Test public void setNewUnimprovedTimeSpentValue() { terminationTreeItemContent.setNewValue(TerminationConfigOption.UNIMPROVED_MILLISECONDS_SPENT_LIMIT); verify(view).setUnimprovedMillisecondsSpent(0L); verify(terminationConfigModel).setUnimprovedMillisecondsSpentLimit(0L); verify(view).setUnimprovedSecondsSpent(0L); verify(terminationConfigModel).setUnimprovedSecondsSpentLimit(0L); verify(view).setUnimprovedMinutesSpent(TerminationTreeItemContent.UNIMPROVED_MINUTES_SPENT_DEFAULT_VALUE); verify(terminationConfigModel).setUnimprovedMinutesSpentLimit(TerminationTreeItemContent.UNIMPROVED_MINUTES_SPENT_DEFAULT_VALUE); verify(view).setUnimprovedHoursSpent(0L); verify(terminationConfigModel).setUnimprovedHoursSpentLimit(0L); verify(view).setUnimprovedDaysSpent(0L); verify(terminationConfigModel).setUnimprovedDaysSpentLimit(0L); }
@Test public void setNewBestScoreFeasibleValue() { terminationTreeItemContent.setNewValue(TerminationConfigOption.BEST_SCORE_FEASIBLE); verify(view).setBestScoreFeasible(true); verify(terminationConfigModel).setBestScoreFeasible(true); }
@Test public void setNewStepCountLimitValue() { terminationTreeItemContent.setNewValue(TerminationConfigOption.STEP_COUNT_LIMIT); verify(view).setStepCountLimit(0); verify(terminationConfigModel).setStepCountLimit(0); }
@Test public void setNewUnimprovedStepCountLimitValue() { terminationTreeItemContent.setNewValue(TerminationConfigOption.UNIMPROVED_STEP_COUNT_LIMIT); verify(view).setUnimprovedStepCountLimit(0); verify(terminationConfigModel).setUnimprovedStepCountLimit(0); }
@Test public void setNewScoreCalculationCountLimitValue() { terminationTreeItemContent.setNewValue(TerminationConfigOption.SCORE_CALCULATION_COUNT_LIMIT); verify(view).setScoreCalculationCountLimit(0L); verify(terminationConfigModel).setScoreCalculationCountLimit(0L); }