Class VelocityTemplatingEngineMocks
java.lang.Object
com.atlassian.jira.template.mocks.VelocityTemplatingEngineMocks
Factory for mock implementations of the
VelocityTemplatingEngine interface.- Since:
- v5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.common.base.Supplier<VelocityTemplatingEngine>alwaysOutput(String output) Returns a builder that returns VelocityTemplatingEngine instances that will always render the specified output string.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.
-
Constructor Details
-
VelocityTemplatingEngineMocks
public VelocityTemplatingEngineMocks()
-
-
Method Details
-
alwaysOutput
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.
-