@Test public void testDestroyWithoutDependentTypes() { final DataType dataType = mock(DataType.class); final DataType dataType0 = mock(DataType.class); final List<DataType> removedDataTypes = asList(dataType0); when(dataType.destroyWithoutDependentTypes()).thenReturn(removedDataTypes); doReturn(dataType).when(listItem).getDataType(); doNothing().when(listItem).destroy(any(), eq(false)); listItem.destroyWithoutDependentTypes(); verify(listItem).destroy(removedDataTypes, false); }
public void destroyWithoutDependentTypes() { final List<DataType> destroyedDataTypes = getDataType().destroyWithoutDependentTypes(); destroy(destroyedDataTypes, false); }
DataTypeListItem { public void destroyWithoutDependentTypes() { final List<DataType> destroyedDataTypes = getDataType().destroyWithoutDependentTypes(); destroy(destroyedDataTypes, false); } }
DataTypeListItem { public void destroyWithoutDependentTypes() { final List<DataType> destroyedDataTypes = getDataType().destroyWithoutDependentTypes(); destroy(destroyedDataTypes, false); } @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 { public void destroyWithoutDependentTypes() { final List<DataType> destroyedDataTypes = getDataType().destroyWithoutDependentTypes(); destroy(destroyedDataTypes, false); } @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 { public void destroyWithoutDependentTypes() { final List<DataType> destroyedDataTypes = getDataType().destroyWithoutDependentTypes(); destroy(destroyedDataTypes, false); } @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);  }