@Test public void testSetupSubDataTypesCSSClassWhenDataTypeHasSubDataTypes() { final DataType dataType = mock(DataType.class); dragAndDropElement.classList = mock(DOMTokenList.class); when(dataType.hasSubDataTypes()).thenReturn(true); view.setupSubDataTypesCSSClass(dataType); verify(dragAndDropElement.classList).add("has-sub-data-types"); }
void setupSubDataTypesCSSClass(final DataType dataType) { final String hasSubDataTypesCSSClass = "has-sub-data-types"; if (dataType.hasSubDataTypes()) { getDragAndDropElement().classList.add(hasSubDataTypesCSSClass); } else { getDragAndDropElement().classList.remove(hasSubDataTypesCSSClass); } }
DataTypeListItemView implements DataTypeListItem.View { void setupSubDataTypesCSSClass(final DataType dataType) { final String hasSubDataTypesCSSClass = "has-sub-data-types"; if (dataType.hasSubDataTypes()) { getDragAndDropElement().classList.add(hasSubDataTypesCSSClass); } else { getDragAndDropElement().classList.remove(hasSubDataTypesCSSClass); } } }
DataTypeListItemView implements DataTypeListItem.View { void setupSubDataTypesCSSClass(final DataType dataType) { final String hasSubDataTypesCSSClass = "has-sub-data-types"; if (dataType.hasSubDataTypes()) { getDragAndDropElement().classList.add(hasSubDataTypesCSSClass); } else { getDragAndDropElement().classList.remove(hasSubDataTypesCSSClass); } } @Inject  DataTypeListItemView(final HTMLDivElement view,
                                final TranslationService translationService,
                                final @DMNEditor ReadOnlyProvider readOnlyProvider); }
DataTypeListItemView implements DataTypeListItem.View { void setupSubDataTypesCSSClass(final DataType dataType) { final String hasSubDataTypesCSSClass = "has-sub-data-types"; if (dataType.hasSubDataTypes()) { getDragAndDropElement().classList.add(hasSubDataTypesCSSClass); } else { getDragAndDropElement().classList.remove(hasSubDataTypesCSSClass); } } @Inject  DataTypeListItemView(final HTMLDivElement view,
                                final TranslationService translationService,
                                final @DMNEditor ReadOnlyProvider readOnlyProvider); @Override void init(final DataTypeListItem presenter); @Override HTMLElement getElement(); @Override void toggleArrow(final boolean show); @Override void expand(); @Override void collapse(); @Override void showEditButton(); @Override void showSaveButton(); @Override void enableFocusMode(); @Override void disableFocusMode(); @Override boolean isOnFocusMode(); @Override String getName(); @Override void setName(final String name); @Override void showDataTypeNameInput(); @Override void hideDataTypeNameInput(); @Override void setupSelectComponent(final DataTypeSelect typeSelect); @Override void setupConstraintComponent(final DataTypeConstraint dataTypeConstraintComponent); @Override void setupListComponent(final SmallSwitchComponent dataTypeListComponent); @Override void showListContainer(); @Override void hideListContainer(); @Override void showListYesLabel(); @Override void hideListYesLabel(); @Override boolean isCollapsed(); @Override void setDataType(final DataType dataType); }
DataTypeListItemView implements DataTypeListItem.View { void setupSubDataTypesCSSClass(final DataType dataType) { final String hasSubDataTypesCSSClass = "has-sub-data-types"; if (dataType.hasSubDataTypes()) { getDragAndDropElement().classList.add(hasSubDataTypesCSSClass); } else { getDragAndDropElement().classList.remove(hasSubDataTypesCSSClass); } } @Inject  DataTypeListItemView(final HTMLDivElement view,
                                final TranslationService translationService,
                                final @DMNEditor ReadOnlyProvider readOnlyProvider); @Override void init(final DataTypeListItem presenter); @Override HTMLElement getElement(); @Override void toggleArrow(final boolean show); @Override void expand(); @Override void collapse(); @Override void showEditButton(); @Override void showSaveButton(); @Override void enableFocusMode(); @Override void disableFocusMode(); @Override boolean isOnFocusMode(); @Override String getName(); @Override void setName(final String name); @Override void showDataTypeNameInput(); @Override void hideDataTypeNameInput(); @Override void setupSelectComponent(final DataTypeSelect typeSelect); @Override void setupConstraintComponent(final DataTypeConstraint dataTypeConstraintComponent); @Override void setupListComponent(final SmallSwitchComponent dataTypeListComponent); @Override void showListContainer(); @Override void hideListContainer(); @Override void showListYesLabel(); @Override void hideListYesLabel(); @Override boolean isCollapsed(); @Override void setDataType(final DataType dataType); static final String UUID_ATTR; static final String NAME_DATA_FIELD; static final String PARENT_UUID_ATTR; }