Class VelocityTemplatingEngineMocks

java.lang.Object
com.atlassian.jira.template.mocks.VelocityTemplatingEngineMocks

public class VelocityTemplatingEngineMocks extends Object
Factory for mock implementations of the VelocityTemplatingEngine interface.
Since:
v5.0
  • Constructor Details

    • VelocityTemplatingEngineMocks

      public VelocityTemplatingEngineMocks()
  • Method Details

    • alwaysOutput

      public static com.google.common.base.Supplier<VelocityTemplatingEngine> alwaysOutput(String output)
      Returns a builder that returns VelocityTemplatingEngine instances that will always render the specified output string.
      Parameters:
      output - The output string to be rendered.
      Returns:
      A builder that returns VelocityTemplatingEngine instances that will always render the specified output string.
    • alwaysThrow

      public static com.google.common.base.Supplier<VelocityTemplatingEngine> alwaysThrow(Exception expectedException)
      Returns a builder that returns VelocityTemplatingEngine instances that will always throw the specified exception on rendering.
      Parameters:
      expectedException - The exception to be thrown on rendering.
      Returns:
      A builder that returns VelocityTemplatingEngine instances that will always throw the specified exception on rendering.