Search in sources :

Example 36 with SVGAttr

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

the class TestSVGAttr method testSetNodeValue.

@Test
public void testSetNodeValue() {
    SVGAttr attr = new SVGAttr("", "", node);
    attr.setNodeValue("val");
    assertEquals("val", attr.getValue());
    assertEquals("val", attr.getNodeValue());
}
Also used : SVGAttr(net.sf.latexdraw.parsers.svg.SVGAttr) Test(org.junit.Test)

Example 37 with SVGAttr

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

the class TestSVGNamedNodeMap method testItemOK.

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

Example 38 with SVGAttr

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

the class TestSVGNamedNodeMap method testSetNamedItem.

@Test
public void testSetNamedItem() {
    final SVGAttr attr1 = new SVGAttr("test1", "v1", doc.createElement("elt1"));
    map.setNamedItem(attr1);
    assertEquals(attr1, map.getNamedItem("test1"));
}
Also used : SVGAttr(net.sf.latexdraw.parsers.svg.SVGAttr) Test(org.junit.Test)

Example 39 with SVGAttr

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

the class TestSVGNamedNodeMap method testGetLength.

@Test
public void testGetLength() {
    map.getAttributes().add(new SVGAttr("", "", doc.createElement("elt")));
    assertEquals(1, map.getLength());
}
Also used : SVGAttr(net.sf.latexdraw.parsers.svg.SVGAttr) Test(org.junit.Test)

Example 40 with SVGAttr

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

the class TestSVGNamedNodeMap method testRemoveNamedItemOK.

@Test
public void testRemoveNamedItemOK() {
    final SVGAttr attr = new SVGAttr("test", "", doc.createElement("elt"));
    map.getAttributes().add(attr);
    assertEquals(attr, 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