Class SVGReferenceRenderingAccuracyTest

All Implemented Interfaces:
Test

public class SVGReferenceRenderingAccuracyTest extends ParametrizedRenderingAccuracyTest
Base class for tests which take an additional parameter in addition to the SVG file.
Version:
$Id: SVGReferenceRenderingAccuracyTest.java 1806580 2017-08-29 12:06:44Z ssteiner $
  • Field Details

    • alias

      protected String alias
  • Constructor Details

    • SVGReferenceRenderingAccuracyTest

      public SVGReferenceRenderingAccuracyTest()
  • Method Details

    • setId

      public void setId(String id)
      For this type of test, the id should be made as follows:
      <fileName>#reference-alias
      For example:
      samples/anne.svg#svgView(viewBox(0,0,100,100))-viewBox1
      Specified by:
      setId in interface Test
      Overrides:
      setId in class ParametrizedRenderingAccuracyTest
    • resolveURL

      protected URL resolveURL(String url)
      Resolves the input string as follows. + First, the string is interpreted as a file description minus any url fragment it may have (stuff after a '#'). If the file's parent directory exists, then the file name is turned into a URL and the fragment if any is appended. + Otherwise, the string is supposed to be a URL. If it is an invalid URL, an IllegalArgumentException is thrown.
      Overrides:
      resolveURL in class AbstractRenderingAccuracyTest
    • buildSVGURL

      protected String buildSVGURL(String svgDir, String svgFile)
      Gives a chance to the subclass to prepend a prefix to the svgFile name. The svgURL is built as: getSVGURLPrefix() + svgDir + svgFile + SVG_EXTENSION + "#" + parameter
    • buildRefImgURL

      protected 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() + svgFile
      Overrides:
      buildRefImgURL in class ParametrizedRenderingAccuracyTest
    • buildVariationURLs

      public 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 + parameter + PNG_EXTENSION
      Overrides:
      buildVariationURLs in class ParametrizedRenderingAccuracyTest
    • buildSaveVariationFile

      public String buildSaveVariationFile(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_EXTENSION
      Overrides:
      buildSaveVariationFile in class ParametrizedRenderingAccuracyTest
    • buildCandidateReferenceFile

      public String buildCandidateReferenceFile(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_EXTENSION
      Overrides:
      buildCandidateReferenceFile in class ParametrizedRenderingAccuracyTest