Search in sources :

Example 1 with SVGNamedNodeMap

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

the class TestSVGNamedNodeMap method testClone2.

@Test
public void testClone2() {
    final SVGAttr attr1 = new SVGAttr("test1", "v1", doc.createElement("elt1"));
    final SVGAttr attr2 = new SVGAttr("test2", "v2", doc.createElement("elt2"));
    map.setNamedItem(attr1);
    map.setNamedItem(attr2);
    SVGNamedNodeMap map2 = (SVGNamedNodeMap) map.clone();
    assertEquals(map.getLength(), map2.getLength());
    assertTrue(map.getNamedItem("test1").isEqualNode(map2.getNamedItem("test1")));
    assertTrue(map.getNamedItem("test2").isEqualNode(map2.getNamedItem("test2")));
}
Also used : SVGAttr(net.sf.latexdraw.parsers.svg.SVGAttr) SVGNamedNodeMap(net.sf.latexdraw.parsers.svg.SVGNamedNodeMap) Test(org.junit.Test)

Example 2 with SVGNamedNodeMap

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

the class TestSVGNamedNodeMap method setUp.

@Before
public void setUp() {
    doc = new SVGDocument();
    map = new SVGNamedNodeMap();
}
Also used : SVGNamedNodeMap(net.sf.latexdraw.parsers.svg.SVGNamedNodeMap) SVGDocument(net.sf.latexdraw.parsers.svg.SVGDocument) Before(org.junit.Before)

Aggregations

SVGNamedNodeMap (net.sf.latexdraw.parsers.svg.SVGNamedNodeMap)2 SVGAttr (net.sf.latexdraw.parsers.svg.SVGAttr)1 SVGDocument (net.sf.latexdraw.parsers.svg.SVGDocument)1 Before (org.junit.Before)1 Test (org.junit.Test)1