Class PreconfiguredRenderingTest

  • All Implemented Interfaces:
    Test
    Direct Known Subclasses:
    BERenderingTest, SamplesRenderingTest

    public abstract class PreconfiguredRenderingTest
    extends SVGRenderingAccuracyTest
    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 $
    • Field Detail

      • PNG_EXTENSION

        public static final java.lang.String PNG_EXTENSION
        Generic constants
        See Also:
        Constant Field Values
      • DEFAULT_VARIATION_PLATFORMS

        public static final java.lang.String[] DEFAULT_VARIATION_PLATFORMS
    • Constructor Detail

      • PreconfiguredRenderingTest

        public PreconfiguredRenderingTest()
    • Method Detail

      • setId

        public void setId​(java.lang.String id)
        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 interface Test
        Overrides:
        setId in class AbstractTest
      • setFile

        public void setFile​(java.lang.String id)
      • getName

        public java.lang.String 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:
        getName in interface Test
        Overrides:
        getName in class AbstractRenderingAccuracyTest
      • buildSVGURL

        protected java.lang.String buildSVGURL​(java.lang.String svgDir,
                                               java.lang.String svgFile,
                                               java.lang.String svgExt)
        Gives a chance to the subclass to prepend a prefix to the svgFile name. The svgURL is built as: getSVGURLPrefix() + svgDir + svgFile
      • getSVGURLPrefix

        protected abstract java.lang.String getSVGURLPrefix()
      • buildRefImgURL

        protected java.lang.String buildRefImgURL​(java.lang.String svgDir,
                                                  java.lang.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() + svgFile
      • getRefImagePrefix

        protected abstract java.lang.String getRefImagePrefix()
      • getRefImageSuffix

        protected abstract java.lang.String getRefImageSuffix()
      • buildVariationURLs

        public java.lang.String[] buildVariationURLs​(java.lang.String svgDir,
                                                     java.lang.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_EXTENSION
      • getVariationPrefix

        protected abstract java.lang.String getVariationPrefix()
      • getVariationSuffix

        protected abstract java.lang.String getVariationSuffix()
      • getVariationPlatforms

        protected abstract java.lang.String[] getVariationPlatforms()
      • buildSaveVariationFile

        public java.lang.String buildSaveVariationFile​(java.lang.String svgDir,
                                                       java.lang.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_EXTENSION
      • getSaveVariationPrefix

        protected abstract java.lang.String getSaveVariationPrefix()
      • getSaveVariationSuffix

        protected abstract java.lang.String getSaveVariationSuffix()
      • buildCandidateReferenceFile

        public java.lang.String buildCandidateReferenceFile​(java.lang.String svgDir,
                                                            java.lang.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_EXTENSION
      • getCandidateReferencePrefix

        protected abstract java.lang.String getCandidateReferencePrefix()
      • getCandidateReferenceSuffix

        protected abstract java.lang.String getCandidateReferenceSuffix()
      • breakSVGFile

        protected java.lang.String[] breakSVGFile​(java.lang.String svgFile)