Search in sources :

Example 16 with SVGAttr

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

the class TestSVGAttr method testLookupNamespaceURINotFound.

@Test
public void testLookupNamespaceURINotFound() {
    SVGAttr attr = new SVGAttr("pref:n", "", node);
    assertNull(attr.lookupNamespaceURI("a"));
}
Also used : SVGAttr(net.sf.latexdraw.parsers.svg.SVGAttr) Test(org.junit.Test)

Example 17 with SVGAttr

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

the class TestSVGAttr method testGetPrefixNULL.

@Test
public void testGetPrefixNULL() {
    SVGAttr attr = new SVGAttr("", "", node);
    assertNull(attr.getPrefix());
}
Also used : SVGAttr(net.sf.latexdraw.parsers.svg.SVGAttr) Test(org.junit.Test)

Example 18 with SVGAttr

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

the class TestSVGNamedNodeMap method testSetNamedItem2.

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

Example 19 with SVGAttr

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

the class TestSVGNamedNodeMap method testGetNamedItemOK.

@Test
public void testGetNamedItemOK() {
    map.getAttributes().add(new SVGAttr("test", "", doc.createElement("elt")));
    assertNotNull(map.getNamedItem("test"));
}
Also used : SVGAttr(net.sf.latexdraw.parsers.svg.SVGAttr) Test(org.junit.Test)

Example 20 with SVGAttr

use of net.sf.latexdraw.parsers.svg.SVGAttr 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)

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