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"));
}
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());
}
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));
}
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"));
}
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")));
}
Aggregations