Class SVGRenderingAccuracyTestValidator
java.lang.Object
org.apache.batik.test.AbstractTest
org.apache.batik.test.DefaultTestSuite
org.apache.batik.test.svg.SVGRenderingAccuracyTestValidator
Validates the operation of
SVGRenderingAccuracyTest
by forcing specific test case situations and checking that
they are handled properly by the class.- Version:
- $Id$
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static classValidates that test passes if proper variation is given(package private) static classValidates that the default parameters computation is working as expected.(package private) static class(package private) static classCreates anSVGRenderingAccuracyTestwith an valid URL for the source SVG valid URL for the reference image, but the reference image, but the reference image does not exist(package private) static classCreates anSVGRenderingAccuracyTestwith an valid URL for the source SVG but with an invalid URL for the reference image.(package private) static classCreates anSVGRenderingAccuracyTestwith a valid URL pointing to an invalid SVG document.(package private) static classCreates anSVGRenderingAccuracyTestwith an invalid URL for the source SVG.(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringSimple invalid SVG content used for this test (the error is that a double quote is missing at the end of the width attribute value.private static final StringSimple valid SVG content used for this test, red rectangleprivate static final StringSimple valid SVG content used for this test, small sizeprivate static final StringSimple valid SVG content used for this testprivate static final StringSimple valid SVG content used for this testFields inherited from class DefaultTestSuite
testsFields inherited from class AbstractTest
id, parent -
Constructor Summary
ConstructorsConstructorDescriptionThis test creates a sample SVG file dynamically and valides that errors are generated for the following cases: + invalid SVG URL + corrupted SVG image (i.e., cannot be transcoded to an image). -
Method Summary
Modifier and TypeMethodDescriptionstatic URLcreateSVGSourceURL(String svgContent) Creates a SVG source URL for the given svg contentstatic URLcreateValidReferenceImage(String svgContent) Helper method: creates a valid reference imageMethods inherited from class DefaultTestSuite
addTest, getChildrenCount, getChildrenTests, getName, removeTest, runImpl, setNameMethods inherited from class AbstractTest
assertEquals, assertEquals, assertNull, assertTrue, error, getId, getParent, getQualifiedId, reportError, reportException, reportSuccess, run, runImplBasic, setId, setParent
-
Field Details
-
validSVG
-
validSVGVariation
-
validSmallSVG
Simple valid SVG content used for this test, small size- See Also:
-
validRedSVG
Simple valid SVG content used for this test, red rectangle- See Also:
-
invalidSVG
Simple invalid SVG content used for this test (the error is that a double quote is missing at the end of the width attribute value.- See Also:
-
-
Constructor Details
-
SVGRenderingAccuracyTestValidator
public SVGRenderingAccuracyTestValidator()This test creates a sample SVG file dynamically and valides that errors are generated for the following cases: + invalid SVG URL + corrupted SVG image (i.e., cannot be transcoded to an image). + invalid reference image URL + valid reference image URL, but inexisting resource. + reference image of different size than generated image. + reference image different than the generated image This test finally validates that the test passes if the reference image corresponds to the newly generated image.
-
-
Method Details
-
createSVGSourceURL
-
createValidReferenceImage
-