Search in sources :

Example 41 with SVGAttr

use of net.sf.latexdraw.parsers.svg.SVGAttr in project latexdraw by arnobl.

the class TestSVGNamedNodeMap method testItemKO.

@Test
public void testItemKO() {
    final SVGAttr attr = new SVGAttr("test", "", doc.createElement("elt"));
    map.getAttributes().add(attr);
    assertNull(map.item(-1));
}
Also used : SVGAttr(net.sf.latexdraw.parsers.svg.SVGAttr) Test(org.junit.Test)

Example 42 with SVGAttr

use of net.sf.latexdraw.parsers.svg.SVGAttr in project latexdraw by arnobl.

the class TestSVGNamedNodeMap method testRemoveNamedItemKOAlreadyRemoved.

@Test(expected = DOMException.class)
public void testRemoveNamedItemKOAlreadyRemoved() {
    final SVGAttr attr = new SVGAttr("test", "", doc.createElement("elt"));
    map.getAttributes().add(attr);
    map.removeNamedItem("test");
    map.removeNamedItem("test");
}
Also used : SVGAttr(net.sf.latexdraw.parsers.svg.SVGAttr) Test(org.junit.Test)

Aggregations

SVGAttr (net.sf.latexdraw.parsers.svg.SVGAttr)42 Test (org.junit.Test)42 SVGElement (net.sf.latexdraw.parsers.svg.SVGElement)2 SVGNamedNodeMap (net.sf.latexdraw.parsers.svg.SVGNamedNodeMap)1