Package org.apache.batik.test.svg
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: SVGRenderingAccuracyTestValidator.java 1803263 2017-07-28 10:51:01Z ssteiner $
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
(package private) static class
Validates that test passes if proper variation is given(package private) static class
Validates that the default parameters computation is working as expected.(package private) static class
(package private) static class
Creates anSVGRenderingAccuracyTest
with 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 class
Creates anSVGRenderingAccuracyTest
with an valid URL for the source SVG but with an invalid URL for the reference image.(package private) static class
Creates anSVGRenderingAccuracyTest
with a valid URL pointing to an invalid SVG document.(package private) static class
Creates anSVGRenderingAccuracyTest
with an invalid URL for the source SVG.(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
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.private static final String
Simple valid SVG content used for this test, red rectangleprivate static final String
Simple valid SVG content used for this test, small sizeprivate static final String
Simple valid SVG content used for this testprivate static final String
Simple valid SVG content used for this testFields inherited from class org.apache.batik.test.DefaultTestSuite
tests
Fields inherited from class org.apache.batik.test.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 URL
createSVGSourceURL
(String svgContent) Creates a SVG source URL for the given svg contentstatic URL
createValidReferenceImage
(String svgContent) Helper method: creates a valid reference imageMethods inherited from class org.apache.batik.test.DefaultTestSuite
addTest, getChildrenCount, getChildrenTests, getName, removeTest, runImpl, setName
Methods inherited from class org.apache.batik.test.AbstractTest
assertEquals, assertEquals, assertNull, assertTrue, error, getId, getParent, getQualifiedId, reportError, reportException, reportSuccess, run, runImplBasic, setId, setParent
-
Field Details
-
validSVG
Simple valid SVG content used for this test- See Also:
-
validSVGVariation
Simple valid SVG content used for this test- See Also:
-
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