Package net.sf.latexdraw.parsers.svg

Examples of net.sf.latexdraw.parsers.svg.SVGNamedNodeMap


  protected SVGDocument doc;

  @Before
  public void setUp() {
    doc = new SVGDocument();
    map = new SVGNamedNodeMap();
  }
View Full Code Here


  @Test
  public void testClone() {
    SVGAttr attr1 = new SVGAttr("test1", "v1", doc.createElement("elt1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    SVGAttr attr2 = new SVGAttr("test2", "v2", doc.createElement("elt2")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    SVGNamedNodeMap map2;

    map.getAttributes().clear();
    assertNull(map.setNamedItem(attr1));
    assertNull(map.setNamedItem(attr2));
    map2 = (SVGNamedNodeMap)map.clone();
    assertEquals(map.getLength(), map2.getLength());
    assertTrue(map.getNamedItem("test1").isEqualNode(map2.getNamedItem("test1"))); //$NON-NLS-1$ //$NON-NLS-2$
    assertTrue(map.getNamedItem("test2").isEqualNode(map2.getNamedItem("test2"))); //$NON-NLS-1$ //$NON-NLS-2$
    map.getAttributes().clear();
  }
View Full Code Here

TOP

Related Classes of net.sf.latexdraw.parsers.svg.SVGNamedNodeMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.