@Test @Ignore public void testGetLinkTitleGetter() throws Exception { assertEquals(l.getSource(), l.getLinkTitle().getFirstChild().getNodeValue()); String alt = "Some alt text"; l.setAlt(alt); assertEquals(alt, l.getLinkTitle().getFirstChild().getNodeValue()); l.setAlt(null); assertEquals(l.getSource(), l.getLinkTitle().getFirstChild().getNodeValue()); }
@Test public void testAltAttribute() throws Exception { l.setAlt("Some text"); assertEquals("Some text", l.getAlt()); assertEquals("Some text", l.getAttribute("alt")); l.setAlt(null); assertEquals("", l.getAttribute("alt")); assertNull(l.getAlt()); l.setAttribute("alt", "Some text"); assertEquals("Some text", l.getAlt()); assertEquals("Some text", l.getAttribute("alt")); l.setAttribute("alt", null); assertEquals("", l.getAttribute("alt")); assertNull(l.getAlt()); }