@Test public void testCleanLevelHighlightClass() { final Element element1 = mock(Element.class); final Element element2 = mock(Element.class); final Element backgroundLine1 = mock(Element.class); final Element backgroundLine2 = mock(Element.class); final Node parentNode = mock(Node.class); final NodeList<Element> highlightedElements = spy(new NodeList<>()); final NodeList<Element> backgroundLines = spy(new NodeList<>()); element1.classList = mock(DOMTokenList.class); element2.classList = mock(DOMTokenList.class); backgroundLine1.parentNode = parentNode; backgroundLine2.parentNode = parentNode; highlightedElements.length = 2; backgroundLines.length = 2; doReturn(element1).when(highlightedElements).getAt(0); doReturn(element2).when(highlightedElements).getAt(1); doReturn(backgroundLine1).when(backgroundLines).getAt(0); doReturn(backgroundLine2).when(backgroundLines).getAt(1); doReturn(highlightedElements).when(helper).querySelectorAll("." + LEVEL_HIGHLIGHT); doReturn(backgroundLines).when(helper).querySelectorAll("." + LEVEL_BACKGROUND_LINE); helper.cleanLevelHighlightClass(); verify(element1.classList).remove(LEVEL_HIGHLIGHT); verify(element2.classList).remove(LEVEL_HIGHLIGHT); verify(parentNode).removeChild(backgroundLine1); verify(parentNode).removeChild(backgroundLine2); }
public void cleanLevelHighlightClass() { cleanBackgroundLine(); cleanCSSClass(LEVEL_HIGHLIGHT); }
DataTypeListHighlightHelper { public void cleanLevelHighlightClass() { cleanBackgroundLine(); cleanCSSClass(LEVEL_HIGHLIGHT); } }
DataTypeListHighlightHelper { public void cleanLevelHighlightClass() { cleanBackgroundLine(); cleanCSSClass(LEVEL_HIGHLIGHT); } @Inject  DataTypeListHighlightHelper(final DataTypeUtils dataTypeUtils); }
DataTypeListHighlightHelper { public void cleanLevelHighlightClass() { cleanBackgroundLine(); cleanCSSClass(LEVEL_HIGHLIGHT); } @Inject  DataTypeListHighlightHelper(final DataTypeUtils dataTypeUtils); void init(final DataTypeList dataTypeList); void highlightLevel(final Element element); void highlight(final Element element); void cleanHighlightClass(); void cleanLevelHighlightClass(); DataTypeList getDataTypeList(); }
DataTypeListHighlightHelper { public void cleanLevelHighlightClass() { cleanBackgroundLine(); cleanCSSClass(LEVEL_HIGHLIGHT); } @Inject  DataTypeListHighlightHelper(final DataTypeUtils dataTypeUtils); void init(final DataTypeList dataTypeList); void highlightLevel(final Element element); void highlight(final Element element); void cleanHighlightClass(); void cleanLevelHighlightClass(); DataTypeList getDataTypeList();  }