Package net.sf.latexdraw.parsers.svg

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


  }


  @Test
  public void testIsId() {
    SVGAttr attr = new SVGAttr("id", "", node); //$NON-NLS-1$ //$NON-NLS-2$

    assertTrue(attr.isId());
    attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$
    assertFalse(attr.isId());
  }
View Full Code Here


  }


  @Test
  public void testSetValue() {
    SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$

    try {
      attr.setValue(null);
      fail();
    }
    catch(DOMException e) { /* Ok */ }

    attr.setValue("val"); //$NON-NLS-1$
    assertEquals("val", attr.getValue()); //$NON-NLS-1$
  }
View Full Code Here

  }


  @Test
  public void testCloneNode() {
    SVGAttr attr = new SVGAttr("n", "v", node); //$NON-NLS-1$ //$NON-NLS-2$
    SVGAttr attr2 = (SVGAttr)attr.cloneNode(false);

    assertNotNull(attr2);
    assertEquals(attr.getName(), attr2.getName());
    assertEquals(attr.getValue(), attr2.getValue());
    assertEquals(attr.getOwnerElement(), attr2.getOwnerElement());
  }
View Full Code Here

  }


  @Test
  public void testGetNodeName() {
    SVGAttr attr = new SVGAttr("attrNodeName", "", node); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals("attrNodeName", attr.getNodeName()); //$NON-NLS-1$
  }
View Full Code Here

  }


  @Test
  public void testGetNodeType() {
    SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(Node.ATTRIBUTE_NODE, attr.getNodeType());
  }
View Full Code Here

  }


  @Test
  public void testGetNodeValue() {
    SVGAttr attr = new SVGAttr("", "attrValue", node); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals("attrValue", attr.getNodeValue()); //$NON-NLS-1$
  }
View Full Code Here

  }


  @Test
  public void testGetParentNode() {
    SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$
    assertEquals(node, attr.getParentNode());
  }
View Full Code Here

  }


  @Test
  public void testHasAttribute() {
    SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$
    assertFalse(attr.hasAttributes());
  }
View Full Code Here

  }


  @Test
  public void testChildNodes() {
    SVGAttr attr = new SVGAttr("", "", node); //$NON-NLS-1$ //$NON-NLS-2$
    assertFalse(attr.hasChildNodes());
  }
View Full Code Here

  }


  @Test
  public void testIsEqualNode() {
    SVGAttr attr = new SVGAttr("n", "v", node); //$NON-NLS-1$ //$NON-NLS-2$
    SVGAttr attr2 = (SVGAttr)attr.cloneNode(false);

    assertTrue(attr.isEqualNode(attr2));
    attr2 = new SVGAttr("n", "", node); //$NON-NLS-1$ //$NON-NLS-2$
    assertFalse(attr.isEqualNode(attr2));
    attr2 = new SVGAttr("", "v", node); //$NON-NLS-1$ //$NON-NLS-2$
    assertFalse(attr.isEqualNode(attr2));
    assertFalse(attr.isEqualNode(null));
  }
View Full Code Here

TOP

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

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.