com.atlassian.jira.template.mocks
Class VelocityTemplatingEngineMocks

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

public class VelocityTemplatingEngineMocks
extends Object

Factory for mock implementations of the VelocityTemplatingEngine interface.

Since:
v5.0

Constructor Summary
VelocityTemplatingEngineMocks()
           
 
Method Summary
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.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityTemplatingEngineMocks

public VelocityTemplatingEngineMocks()
Method Detail

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.


Copyright © 2002-2013 Atlassian. All Rights Reserved.