public class

VelocityTemplatingEngineMocks

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

Class Overview

Factory for mock implementations of the VelocityTemplatingEngine interface.

Summary

Public Constructors
VelocityTemplatingEngineMocks()
Public Methods
static Supplier<VelocityTemplatingEngine> alwaysOutput(String output)
Returns a builder that returns VelocityTemplatingEngine instances that will always render the specified output string.
static Supplier<VelocityTemplatingEngine> alwaysThrow(Exception expectedException)
Returns a builder that returns VelocityTemplatingEngine instances that will always throw the specified exception on rendering.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public VelocityTemplatingEngineMocks ()

Public Methods

public static 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.

public static 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.