@Test public void testSetupDataType() { final DataType expectedDataType = this.dataType; final int expectedLevel = 1; doNothing().when(listItem).setupDragAndDropComponent(); doNothing().when(listItem).setupView(); listItem.setupDataType(expectedDataType, expectedLevel); final InOrder inOrder = inOrder(listItem); inOrder.verify(listItem).setupDragAndDropComponent(); inOrder.verify(listItem).setupSelectComponent(); inOrder.verify(listItem).setupListComponent(); inOrder.verify(listItem).setupConstraintComponent(); inOrder.verify(listItem).setupView(); assertEquals(expectedDataType, listItem.getDataType()); assertEquals(expectedLevel, listItem.getLevel()); }
void setupDataType(final DataType dataType, final int level) { this.dataType = dataType; this.level = level; setupDragAndDropComponent(); setupSelectComponent(); setupListComponent(); setupConstraintComponent(); setupView(); }
DataTypeListItem { void setupDataType(final DataType dataType, final int level) { this.dataType = dataType; this.level = level; setupDragAndDropComponent(); setupSelectComponent(); setupListComponent(); setupConstraintComponent(); setupView(); } }
DataTypeListItem { void setupDataType(final DataType dataType, final int level) { this.dataType = dataType; this.level = level; setupDragAndDropComponent(); setupSelectComponent(); setupListComponent(); setupConstraintComponent(); setupView(); } @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 setupDataType(final DataType dataType, final int level) { this.dataType = dataType; this.level = level; setupDragAndDropComponent(); setupSelectComponent(); setupListComponent(); setupConstraintComponent(); setupView(); } @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 setupDataType(final DataType dataType, final int level) { this.dataType = dataType; this.level = level; setupDragAndDropComponent(); setupSelectComponent(); setupListComponent(); setupConstraintComponent(); setupView(); } @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);  }