Package org.apache.batik.test.svg
Class PreconfiguredRenderingTest
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
- All Implemented Interfaces:
Test
- Direct Known Subclasses:
BERenderingTest,SamplesRenderingTest
Convenience class for creating a SVGRenderingAccuracyTest with predefined
rules for the various configuration parameters.
- Version:
- $Id: PreconfiguredRenderingTest.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 TypeFieldDescriptionstatic final String[]static final charstatic final StringGeneric constantsstatic final Stringstatic final StringFields inherited from class org.apache.batik.test.svg.SVGRenderingAccuracyTest
ERROR_CANNOT_TRANSCODE_SVG, userLanguage, validate, VALIDATING_PARSERFields 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, variationURLsFields inherited from class org.apache.batik.test.AbstractTest
id, name, parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]breakSVGFile(String svgFile) buildCandidateReferenceFile(String svgDir, String svgFile) Gives a chance to the subclass to control the construction of the candidateReference URL, which is built as: getCandidatereferencePrefix() + svgDir + getCandidatereferenceSuffix() + svgFile + PNG_EXTENSIONprotected StringbuildRefImgURL(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 + PNG_EXTENSIONprotected StringbuildSVGURL(String svgDir, String svgFile, String svgExt) Gives a chance to the subclass to prepend a prefix to the svgFile name.String[]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 + PNG_EXTENSIONprotected abstract Stringprotected abstract StringgetName()Make the name as simple as possible.protected abstract Stringprotected abstract Stringprotected abstract Stringprotected abstract Stringprotected abstract Stringprotected abstract String[]protected abstract Stringprotected abstract StringvoidvoidFor preconfigured tests, the configuration has to be derived from the test identifier.Methods inherited from class org.apache.batik.test.svg.SVGRenderingAccuracyTest
encode, getTestImageTranscoder, getUserLanguage, getValidating, manipulateSVGDocument, setUserLanguage, setValidatingMethods 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, setSaveVariationMethods 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
-
PNG_EXTENSION
Generic constants- See Also:
-
SVG_EXTENSION
- See Also:
-
SVGZ_EXTENSION
- See Also:
-
PATH_SEPARATOR
public static final char PATH_SEPARATOR- See Also:
-
DEFAULT_VARIATION_PLATFORMS
-
-
Constructor Details
-
PreconfiguredRenderingTest
public PreconfiguredRenderingTest()
-
-
Method Details
-
setId
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:
setIdin interfaceTest- Overrides:
setIdin classAbstractTest
-
setFile
-
getName
Make the name as simple as possible. For preconfigured SVG files, we use the test id, which is the relevant identifier for the test user.- Specified by:
getNamein interfaceTest- Overrides:
getNamein classAbstractRenderingAccuracyTest
-
buildSVGURL
Gives a chance to the subclass to prepend a prefix to the svgFile name. The svgURL is built as: getSVGURLPrefix() + svgDir + svgFile -
getSVGURLPrefix
-
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 -
getRefImagePrefix
-
getRefImageSuffix
-
buildVariationURLs
Gives a chance to the subclass to control the construction of the variation URL, which is built as: getVariationPrefix() + svgDir + getVariationSuffix() + svgFile + PNG_EXTENSION -
getVariationPrefix
-
getVariationSuffix
-
getVariationPlatforms
-
buildSaveVariationFile
Gives a chance to the subclass to control the construction of the saveVariation URL, which is built as: getSaveVariationPrefix() + svgDir + getSaveVariationSuffix() + svgFile + PNG_EXTENSION -
getSaveVariationPrefix
-
getSaveVariationSuffix
-
buildCandidateReferenceFile
Gives a chance to the subclass to control the construction of the candidateReference URL, which is built as: getCandidatereferencePrefix() + svgDir + getCandidatereferenceSuffix() + svgFile + PNG_EXTENSION -
getCandidateReferencePrefix
-
getCandidateReferenceSuffix
-
breakSVGFile
-