CssPseudoElementNode extends CssContextNode implements IElementNode, ICustomElementNode { @Override public IAttributes getAttributes() { return new AttributesStub(); } CssPseudoElementNode(INode parentNode, String pseudoElementName); String getPseudoElementName(); @Override String name(); @Override IAttributes getAttributes(); @Override String getAttribute(String key); @Override List<Map<String, String>> getAdditionalHtmlStyles(); @Override void addAdditionalHtmlStyles(Map<String, String> styles); @Override String getLang();  }
@Test public void getAttributesTest() { CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after"); Assert.assertTrue(pseudoElementNode.getAttributes() instanceof IAttributes); Assert.assertFalse(pseudoElementNode.getAttributes() == pseudoElementNode.getAttributes()); }
@Test public void attributesStubSetAttributeTest() { junitExpectedException.expect(UnsupportedOperationException.class); CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after"); pseudoElementNode.getAttributes().setAttribute("content", "iText"); Assert.fail(); }
@Test public void attributesStubGetSizeTest() { CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after"); Assert.assertEquals(0, pseudoElementNode.getAttributes().size()); }
@Test public void attributesStubIteratorTest() { CssPseudoElementNode pseudoElementNode = new CssPseudoElementNode(null, "after"); for (IAttribute attr : pseudoElementNode.getAttributes()) { Assert.fail("AttributesStub must return an empty iterator"); } }