public class TestSVGImageElement extends AbstractTestSVGElement {
@SuppressWarnings("unused")
@Test
public void testContructor() throws MalformedSVGDocument {
try {
new SVGImageElement(null, ""); //$NON-NLS-1$
fail();
}
catch(Exception e){/**/}
try {
new SVGImageElement(node, null);
fail();
}
catch(MalformedSVGDocument e){/**/}
try {
node.setAttribute(SVGAttributes.SVG_WIDTH, "dsd"); //$NON-NLS-1$
node.setAttribute(SVGAttributes.SVG_HEIGHT, "dsd"); //$NON-NLS-1$
new SVGImageElement(node, null);
fail();
}
catch(MalformedSVGDocument e){/**/}
try {
node.setAttribute(SVGAttributes.SVG_WIDTH, "1"); //$NON-NLS-1$
new SVGImageElement(node, null);
fail();
}
catch(MalformedSVGDocument e){/**/}
try {
node.setAttribute(SVGAttributes.SVG_WIDTH, "-1"); //$NON-NLS-1$
node.setAttribute(SVGAttributes.SVG_HEIGHT, "10"); //$NON-NLS-1$
new SVGImageElement(node, null);
fail();
}
catch(MalformedSVGDocument e){/**/}
try {
node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$
node.setAttribute(SVGAttributes.SVG_HEIGHT, "-1"); //$NON-NLS-1$
new SVGImageElement(node, null);
fail();
}
catch(MalformedSVGDocument e){/**/}
node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$
new SVGImageElement(node, null);
}