Interface SpecExampleProcessor

All Known Implementing Classes:
ComboSpecTestCase, FormatterSpecTest, FormatterTranslationSpecTestBase, FullSpecTestCase, RendererSpecTest, RenderingTestCase, TranslationFormatterSpecTest

public interface SpecExampleProcessor
  • Method Details

    • options

      @Nullable @Nullable DataHolder options(@NotNull @NotNull String option)
      Customize options for an example
      Parameters:
      option - name of the options set to use
      Returns:
      options or null to use default
    • checkExample

      @NotNull default @NotNull SpecExample checkExample(@NotNull @NotNull SpecExample example)
      Allows tests to modify example during reading (DumpSpecReader)
      Parameters:
      example - example as it is in the test or spec file
      Returns:
      modified example if needed
    • getSpecExampleRenderer

      @NotNull @NotNull SpecExampleRenderer getSpecExampleRenderer(@NotNull @NotNull SpecExample example, @Nullable @Nullable DataHolder exampleOptions)
      Get spec renderer for an example spec
      Parameters:
      example - spec example
      exampleOptions - example custom options
      Returns:
      spec renderer for given example and options
    • addFullSpecExample

      void addFullSpecExample(@NotNull @NotNull SpecExampleRenderer exampleRenderer, @NotNull @NotNull SpecExampleParse exampleParse, @Nullable @Nullable DataHolder exampleOptions, boolean ignoredTestCase, @NotNull @NotNull String html, @Nullable @Nullable String ast)
      Called by DumpSpecReader for each example when processing full test spec
      Parameters:
      exampleRenderer - example renderer
      exampleParse - example parse state
      exampleOptions - example options
      ignoredTestCase - true if ignored example
      html - html used for comparison to expected html
      ast - ast used for comparison to expected ast