use of net.sf.latexdraw.parsers.svg.SVGAttr in project latexdraw by arnobl.
the class TestSVGAttr method testLookupNamespaceURIOK.
@Test
public void testLookupNamespaceURIOK() {
SVGAttr attr = new SVGAttr("pref:n", "", node);
SVGElement elt = (SVGElement) node.getOwnerDocument().createElement("tag2");
elt.setAttribute("xmlns:pref", "namespace");
elt.appendChild(node);
assertEquals("namespace", attr.lookupNamespaceURI("pref"));
}
use of net.sf.latexdraw.parsers.svg.SVGAttr in project latexdraw by arnobl.
the class TestSVGAttr method testHasAttribute.
@Test
public void testHasAttribute() {
SVGAttr attr = new SVGAttr("", "", node);
assertFalse(attr.hasAttributes());
}
use of net.sf.latexdraw.parsers.svg.SVGAttr in project latexdraw by arnobl.
the class TestSVGAttr method testGetElementOwner.
@Test
public void testGetElementOwner() {
SVGAttr attr = new SVGAttr("", "", node);
assertEquals(node, attr.getOwnerElement());
}
use of net.sf.latexdraw.parsers.svg.SVGAttr in project latexdraw by arnobl.
the class TestSVGAttr method testGetNamespaceURIOK.
@Test
public void testGetNamespaceURIOK() {
SVGAttr attr = new SVGAttr("pref:n", "", node);
SVGElement elt = (SVGElement) node.getOwnerDocument().createElement("tag2");
elt.setAttribute("xmlns:pref", "namespace");
elt.appendChild(node);
assertEquals("namespace", attr.getNamespaceURI());
}
use of net.sf.latexdraw.parsers.svg.SVGAttr in project latexdraw by arnobl.
the class TestSVGAttr method testIsEqualNodeOK.
@Test
public void testIsEqualNodeOK() {
SVGAttr attr = new SVGAttr("n", "v", node);
SVGAttr attr2 = (SVGAttr) attr.cloneNode(false);
assertTrue(attr.isEqualNode(attr2));
}
Aggregations