@Test public void testSetupView() { final DataType dataType = mock(DataType.class); when(listItem.getDataType()).thenReturn(dataType); doNothing().when(listItem).setupIndentationLevel(); doNothing().when(listItem).hideTooltips(); listItem.setupView(); verify(view).setupSelectComponent(dataTypeSelectComponent); verify(view).setupConstraintComponent(dataTypeConstraintComponent); verify(view).setupListComponent(dataTypeListComponent); verify(view).setDataType(dataType); verify(listItem).setupIndentationLevel(); verify(listItem).hideTooltips(); }
void setupView() { view.setupSelectComponent(dataTypeSelectComponent); view.setupConstraintComponent(dataTypeConstraintComponent); view.setupListComponent(dataTypeListComponent); view.setDataType(getDataType()); setupIndentationLevel(); hideTooltips(); }
DataTypeListItem { void setupView() { view.setupSelectComponent(dataTypeSelectComponent); view.setupConstraintComponent(dataTypeConstraintComponent); view.setupListComponent(dataTypeListComponent); view.setDataType(getDataType()); setupIndentationLevel(); hideTooltips(); } }
DataTypeListItem { void setupView() { view.setupSelectComponent(dataTypeSelectComponent); view.setupConstraintComponent(dataTypeConstraintComponent); view.setupListComponent(dataTypeListComponent); view.setDataType(getDataType()); setupIndentationLevel(); hideTooltips(); } @Inject  DataTypeListItem(final View view,
                            final DataTypeSelect dataTypeSelectComponent,
                            final DataTypeConstraint dataTypeConstraintComponent,
                            final SmallSwitchComponent dataTypeListComponent,
                            final DataTypeManager dataTypeManager,
                            final DataTypeConfirmation confirmation,
                            final DataTypeNameFormatValidator nameFormatValidator,
                            final Event<DataTypeEditModeToggleEvent> editModeToggleEvent,
                            final Event<DataTypeChangedEvent> dataTypeChangedEvent); }
DataTypeListItem { void setupView() { view.setupSelectComponent(dataTypeSelectComponent); view.setupConstraintComponent(dataTypeConstraintComponent); view.setupListComponent(dataTypeListComponent); view.setDataType(getDataType()); setupIndentationLevel(); hideTooltips(); } @Inject  DataTypeListItem(final View view,
                            final DataTypeSelect dataTypeSelectComponent,
                            final DataTypeConstraint dataTypeConstraintComponent,
                            final SmallSwitchComponent dataTypeListComponent,
                            final DataTypeManager dataTypeManager,
                            final DataTypeConfirmation confirmation,
                            final DataTypeNameFormatValidator nameFormatValidator,
                            final Event<DataTypeEditModeToggleEvent> editModeToggleEvent,
                            final Event<DataTypeChangedEvent> dataTypeChangedEvent); void init(final DataTypeList dataTypeList); DataType getDataType(); boolean isReadOnly(); int getLevel(); boolean isCollapsed(); void expand(); void collapse(); void enableEditMode(); void disableEditMode(); void saveAndCloseEditMode(); void remove(); Command removeItem(); Command destroy(); void destroyWithDependentTypes(); void destroyWithoutDependentTypes(); String getType(); void insertFieldAbove(); String insertFieldAbove(final DataType dataType); void insertFieldBelow(); String insertFieldBelow(final DataType dataType); void insertNestedField(); void insertNestedField(final DataType newDataType); HTMLElement getDragAndDropElement(); void highlightLevel(final DataType dataType); }
DataTypeListItem { void setupView() { view.setupSelectComponent(dataTypeSelectComponent); view.setupConstraintComponent(dataTypeConstraintComponent); view.setupListComponent(dataTypeListComponent); view.setDataType(getDataType()); setupIndentationLevel(); hideTooltips(); } @Inject  DataTypeListItem(final View view,
                            final DataTypeSelect dataTypeSelectComponent,
                            final DataTypeConstraint dataTypeConstraintComponent,
                            final SmallSwitchComponent dataTypeListComponent,
                            final DataTypeManager dataTypeManager,
                            final DataTypeConfirmation confirmation,
                            final DataTypeNameFormatValidator nameFormatValidator,
                            final Event<DataTypeEditModeToggleEvent> editModeToggleEvent,
                            final Event<DataTypeChangedEvent> dataTypeChangedEvent); void init(final DataTypeList dataTypeList); DataType getDataType(); boolean isReadOnly(); int getLevel(); boolean isCollapsed(); void expand(); void collapse(); void enableEditMode(); void disableEditMode(); void saveAndCloseEditMode(); void remove(); Command removeItem(); Command destroy(); void destroyWithDependentTypes(); void destroyWithoutDependentTypes(); String getType(); void insertFieldAbove(); String insertFieldAbove(final DataType dataType); void insertFieldBelow(); String insertFieldBelow(final DataType dataType); void insertNestedField(); void insertNestedField(final DataType newDataType); HTMLElement getDragAndDropElement(); void highlightLevel(final DataType dataType);  }