CssPseudoElementUtil { public static boolean hasBeforeAfterElements(IElementNode node) { if (node == null || node instanceof CssPseudoElementNode || node.name().startsWith(TAG_NAME_PREFIX)) { return false; } return true; }  static String createPseudoElementTagName(String pseudoElementName); static boolean hasBeforeAfterElements(IElementNode node);  }
@Test public void hasBeforeAfterElementsNullScenarioTest() { Assert.assertFalse(CssPseudoElementUtil.hasBeforeAfterElements(null)); }
@Test public void hasBeforeAfterElementsInstanceOfTest() { Assert.assertFalse(CssPseudoElementUtil .hasBeforeAfterElements(new CssPseudoElementNode(null, ""))); }
@Test public void hasBeforeAfterElementsNodeNameTest() { Element element = new Element(Tag.valueOf("pseudo-element::"), ""); IElementNode node = new JsoupElementNode(element); Assert.assertFalse(CssPseudoElementUtil.hasBeforeAfterElements(node)); }
@Test public void hasAfterElementTest() { Element element = new Element(Tag.valueOf("after"), ""); IElementNode node = new JsoupElementNode(element); Assert.assertTrue(CssPseudoElementUtil.hasBeforeAfterElements(node)); }
@Test public void hasBeforeElementTest() { Element element = new Element(Tag.valueOf("before"), ""); IElementNode node = new JsoupElementNode(element); Assert.assertTrue(CssPseudoElementUtil.hasBeforeAfterElements(node)); }