@Test public void testSetValues() { List<String> values = Arrays.asList("a", "b", "c"); component.setValues(values); Assertions.assertThat(component.getSelectedValues()) .isEmpty(); Assertions.assertThat(component.getTableValues()) .isNotEmpty() .hasSize(values.size()); Assertions.assertThat(component.getValues()) .isNotEmpty() .containsAll(values); verify(component, times(2)).doInit(); verify(component, times(2)).init(anyString()); }
public void setValues(List<TYPE> values) { selectedValues.clear(); tableValues.clear(); tableValues = values.stream() .map(value -> new TableEntry<>(value)) .collect(Collectors.toList()); doInit(); init(modelType); }
MultipleInputComponent implements MultipleInputComponentView.Presenter<TYPE>,
                                                     IsElement { public void setValues(List<TYPE> values) { selectedValues.clear(); tableValues.clear(); tableValues = values.stream() .map(value -> new TableEntry<>(value)) .collect(Collectors.toList()); doInit(); init(modelType); } }
MultipleInputComponent implements MultipleInputComponentView.Presenter<TYPE>,
                                                     IsElement { public void setValues(List<TYPE> values) { selectedValues.clear(); tableValues.clear(); tableValues = values.stream() .map(value -> new TableEntry<>(value)) .collect(Collectors.toList()); doInit(); init(modelType); } @Inject  MultipleInputComponent(MultipleInputComponentView view,
                                  EditableColumnGeneratorManager columnGeneratorManager); }
MultipleInputComponent implements MultipleInputComponentView.Presenter<TYPE>,
                                                     IsElement { public void setValues(List<TYPE> values) { selectedValues.clear(); tableValues.clear(); tableValues = values.stream() .map(value -> new TableEntry<>(value)) .collect(Collectors.toList()); doInit(); init(modelType); } @Inject  MultipleInputComponent(MultipleInputComponentView view,
                                  EditableColumnGeneratorManager columnGeneratorManager); @PostConstruct void init(); @Override HTMLElement getElement(); void init(String modelType); @Override EditableColumnGenerator<TYPE> getColumnGenerator(); @Override void notifyChange(int index,
                             TYPE value); void setPageSize(Integer pageSize); @Override void selectValue(TableEntry<TYPE> entry); @Override void promoteSelectedValues(); @Override void degradeSelectedValues(); @Override void removeSelectedValues(); @Override Boolean isSelected(TableEntry<TYPE> object); List<TYPE> getValues(); void setValues(List<TYPE> values); void setReadOnly(boolean readOnly); @Override boolean isReadOnly(); @Override void newElement(); @Override Integer getPageSize(); @Override AbstractDataProvider<TableEntry<TYPE>> getProvider(); void setValueChangedCommand(Command valueChangedCommand); }
MultipleInputComponent implements MultipleInputComponentView.Presenter<TYPE>,
                                                     IsElement { public void setValues(List<TYPE> values) { selectedValues.clear(); tableValues.clear(); tableValues = values.stream() .map(value -> new TableEntry<>(value)) .collect(Collectors.toList()); doInit(); init(modelType); } @Inject  MultipleInputComponent(MultipleInputComponentView view,
                                  EditableColumnGeneratorManager columnGeneratorManager); @PostConstruct void init(); @Override HTMLElement getElement(); void init(String modelType); @Override EditableColumnGenerator<TYPE> getColumnGenerator(); @Override void notifyChange(int index,
                             TYPE value); void setPageSize(Integer pageSize); @Override void selectValue(TableEntry<TYPE> entry); @Override void promoteSelectedValues(); @Override void degradeSelectedValues(); @Override void removeSelectedValues(); @Override Boolean isSelected(TableEntry<TYPE> object); List<TYPE> getValues(); void setValues(List<TYPE> values); void setReadOnly(boolean readOnly); @Override boolean isReadOnly(); @Override void newElement(); @Override Integer getPageSize(); @Override AbstractDataProvider<TableEntry<TYPE>> getProvider(); void setValueChangedCommand(Command valueChangedCommand);  }