TerminationTreeItemContent implements IsElement { public void setTerminationConfigOption(TerminationConfigOption terminationConfigOption) { this.terminationConfigOption = terminationConfigOption; view.setNestedTreeItem(terminationConfigOption == NESTED); if (terminationConfigOption == NESTED) { view.setDropDownHelpContent(translationService.getTranslation(SolverEditorConstants.TerminationTreeItemContentTerminationCompositionStyleHelp)); } setLabelStrings(terminationConfigOption); hideViewInputs(terminationConfigOption); } @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 setNestedTerminationConfigOption() { terminationTreeItemContent.setTerminationConfigOption(TerminationConfigOption.NESTED); verify(view, times(1)).setDropDownHelpContent(any()); }
@Test public void setNonNestedTerminationConfigOption() { terminationTreeItemContent.setTerminationConfigOption(TerminationConfigOption.MILLISECONDS_SPENT_LIMIT); verify(view).setNestedTreeItem(false); verify(view, times(0)).setDropDownHelpContent(any()); verify(view).setFormLabelText(any()); verify(view).setFormLabelHelpContent(any()); }