Package org.apache.batik.test.svg
Class ParametrizedRenderingAccuracyTest
java.lang.Object
org.apache.batik.test.AbstractTest
org.apache.batik.test.svg.AbstractRenderingAccuracyTest
org.apache.batik.test.svg.SVGRenderingAccuracyTest
org.apache.batik.test.svg.PreconfiguredRenderingTest
org.apache.batik.test.svg.SamplesRenderingTest
org.apache.batik.test.svg.ParametrizedRenderingAccuracyTest
- All Implemented Interfaces:
Test
- Direct Known Subclasses:
SVGAlternateStyleSheetRenderingAccuracyTest
,SVGMediaRenderingAccuracyTest
,SVGReferenceRenderingAccuracyTest
,SVGTextContentRenderingAccuracyTest
Base class for tests which take an additional parameter in addition
to the SVG file.
- Version:
- $Id: ParametrizedRenderingAccuracyTest.java 1804130 2017-08-04 14:41:11Z ssteiner $
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.batik.test.svg.SVGRenderingAccuracyTest
SVGRenderingAccuracyTest.InternalPNGTranscoder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
Parameter which was passed appended to the SVG filestatic final char
Fields inherited from class org.apache.batik.test.svg.SamplesRenderingTest
REF_IMAGE_PREFIX, REF_IMAGE_SUFFIX, SAVE_CANDIDATE_REFERENCE_PREFIX, SAVE_CANDIDATE_REFERENCE_SUFFIX, SAVE_VARIATION_PREFIX, SAVE_VARIATION_SUFFIX, SVG_URL_PREFIX, VARIATION_PREFIX, VARIATION_SUFFIX
Fields inherited from class org.apache.batik.test.svg.PreconfiguredRenderingTest
DEFAULT_VARIATION_PLATFORMS, PATH_SEPARATOR, PNG_EXTENSION, SVG_EXTENSION, SVGZ_EXTENSION
Fields inherited from class org.apache.batik.test.svg.SVGRenderingAccuracyTest
ERROR_CANNOT_TRANSCODE_SVG, userLanguage, validate, VALIDATING_PARSER
Fields inherited from class org.apache.batik.test.svg.AbstractRenderingAccuracyTest
candidateReference, configuration, CONFIGURATION_RESOURCES, COULD_NOT_GENERATE_COMPARISON_IMAGES, COULD_NOT_LOAD_IMAGE, COULD_NOT_OPEN_VARIATION_URL, ENTRY_KEY_DIFFERENCE_IMAGE, ENTRY_KEY_ERROR_DESCRIPTION, ENTRY_KEY_INTERNAL_ERROR, ENTRY_KEY_REFERENCE_GENERATED_IMAGE_URI, ERROR_CANNOT_CREATE_TEMP_FILE, ERROR_CANNOT_CREATE_TEMP_FILE_STREAM, ERROR_CANNOT_OPEN_GENERATED_IMAGE, ERROR_CANNOT_OPEN_REFERENCE_IMAGE, ERROR_ERROR_WHILE_COMPARING_FILES, ERROR_SVG_RENDERING_NOT_ACCURATE, IMAGE_FILE_EXTENSION, IMAGE_TYPE_COMPARISON, IMAGE_TYPE_DIFF, refImgURL, saveVariation, svgURL, TEMP_FILE_PREFIX, TEMP_FILE_SUFFIX, tempDirectory, variationURLs
Fields inherited from class org.apache.batik.test.AbstractTest
id, name, parent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildCandidateReferenceFile
(String svgDir, String svgFile) Gives a chance to the subclass to control the construction of the candidateReference URL, which is built as: getSaveVariationPrefix() + svgDir + getSaveVariationSuffix() + svgFile + parameter + PNG_EXTENSIONprotected String
buildRefImgURL
(String svgDir, String svgFile) Gives a chance to the subclass to control the construction of the reference PNG file from the svgFile name The refImgURL is built as: getRefImagePrefix() + svgDir + getRefImageSuffix() + svgFilebuildSaveVariationFile
(String svgDir, String svgFile) Gives a chance to the subclass to control the construction of the saveVariation URL, which is built as: getSaveVariationPrefix() + svgDir + getSaveVariationSuffix() + svgFile + parameter + PNG_EXTENSIONString[]
buildVariationURLs
(String svgDir, String svgFile) Gives a chance to the subclass to control the construction of the variation URL, which is built as: getVariationPrefix() + svgDir + getVariationSuffix() + svgFile + parameter + PNG_EXTENSIONchar
void
For preconfigured tests, the configuration has to be derived from the test identifier.Methods inherited from class org.apache.batik.test.svg.SamplesRenderingTest
getCandidateReferencePrefix, getCandidateReferenceSuffix, getRefImagePrefix, getRefImageSuffix, getSaveVariationPrefix, getSaveVariationSuffix, getSVGURLPrefix, getVariationPlatforms, getVariationPrefix, getVariationSuffix
Methods inherited from class org.apache.batik.test.svg.PreconfiguredRenderingTest
breakSVGFile, buildSVGURL, getName, setFile
Methods inherited from class org.apache.batik.test.svg.SVGRenderingAccuracyTest
encode, getTestImageTranscoder, getUserLanguage, getValidating, manipulateSVGDocument, setUserLanguage, setValidating
Methods inherited from class org.apache.batik.test.svg.AbstractRenderingAccuracyTest
addVariationURL, buildDiffImage, compare, getCandidateReference, getImage, getImage, getNextTempFileName, getNextTempFileName, getSaveVariation, getTempDirectory, getURLFile, getVariationURLs, imageToFile, makeCompareImage, makeRandomFileName, makeTempFileName, resolveURL, run, saveImage, saveImage, setCandidateReference, setConfig, setSaveVariation
Methods inherited from class org.apache.batik.test.AbstractTest
assertEquals, assertEquals, assertNull, assertTrue, error, getId, getParent, getQualifiedId, reportError, reportException, reportSuccess, runImpl, runImplBasic, setName, setParent
-
Field Details
-
PARAMETER_SEPARATOR
public static final char PARAMETER_SEPARATOR- See Also:
-
parameter
Parameter which was passed appended to the SVG file
-
-
Constructor Details
-
ParametrizedRenderingAccuracyTest
public ParametrizedRenderingAccuracyTest()Constructor.
-
-
Method Details
-
getParameterSeparator
public char getParameterSeparator() -
setId
Description copied from class:PreconfiguredRenderingTest
For preconfigured tests, the configuration has to be derived from the test identifier. The identifier should characterize the SVG file to be tested.- Specified by:
setId
in interfaceTest
- Overrides:
setId
in classPreconfiguredRenderingTest
-
buildRefImgURL
Gives a chance to the subclass to control the construction of the reference PNG file from the svgFile name The refImgURL is built as: getRefImagePrefix() + svgDir + getRefImageSuffix() + svgFile- Overrides:
buildRefImgURL
in classPreconfiguredRenderingTest
-
buildVariationURLs
Gives a chance to the subclass to control the construction of the variation URL, which is built as: getVariationPrefix() + svgDir + getVariationSuffix() + svgFile + parameter + PNG_EXTENSION- Overrides:
buildVariationURLs
in classPreconfiguredRenderingTest
-
buildSaveVariationFile
Gives a chance to the subclass to control the construction of the saveVariation URL, which is built as: getSaveVariationPrefix() + svgDir + getSaveVariationSuffix() + svgFile + parameter + PNG_EXTENSION- Overrides:
buildSaveVariationFile
in classPreconfiguredRenderingTest
-
buildCandidateReferenceFile
Gives a chance to the subclass to control the construction of the candidateReference URL, which is built as: getSaveVariationPrefix() + svgDir + getSaveVariationSuffix() + svgFile + parameter + PNG_EXTENSION- Overrides:
buildCandidateReferenceFile
in classPreconfiguredRenderingTest
-