public class TestSVGRectElement extends AbstractTestSVGElement {
@SuppressWarnings("unused")
@Test
public void testContructor() throws MalformedSVGDocument {
try {
new SVGRectElement(null, null);
fail();
}
catch(Exception e){/**/}
try {
new SVGRectElement(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 SVGRectElement(node, null);
fail();
}
catch(MalformedSVGDocument e){/**/}
try {
node.setAttribute(SVGAttributes.SVG_WIDTH, "1"); //$NON-NLS-1$
new SVGRectElement(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 SVGRectElement(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 SVGRectElement(node, null);
fail();
}
catch(MalformedSVGDocument e){/**/}
node.setAttribute(SVGAttributes.SVG_WIDTH, "10"); //$NON-NLS-1$
node.setAttribute(SVGAttributes.SVG_HEIGHT, "20"); //$NON-NLS-1$
new SVGRectElement(node, null);
}