org.finra.jtaf.core.commands
Class FailHere

java.lang.Object
  extended by org.finra.jtaf.core.model.invocationtarget.InvocationTarget
      extended by org.finra.jtaf.core.model.invocationtarget.Command
          extended by org.finra.jtaf.core.commands.FailHere

public class FailHere
extends Command

This command is used to force a failure. This is mainly used for testing other commands to make sure that they work correctly.


Field Summary
 
Fields inherited from class org.finra.jtaf.core.model.invocationtarget.Command
interpreter, recordResult
 
Fields inherited from class org.finra.jtaf.core.model.invocationtarget.InvocationTarget
globalContext
 
Constructor Summary
FailHere(String name)
          This called when instantiating the command before it is executed by the interpreter
 
Method Summary
protected  void execute(IInvocationContext ctx)
          This method throws an AssertionFailedException to force a failure.
 
Methods inherited from class org.finra.jtaf.core.model.invocationtarget.Command
acceptInvocationTargetVisitor, clearContext, deinitialize, executeInvocation, getBooleanOrDefault, getContext, getFloatOrDefault, getIntegerOrDefault, getOptionalObject, getOptionalString, getRequiredBoolean, getRequiredFloat, getRequiredInteger, getRequiredObject, getRequiredString, getStringOrDefault, initialize, launch, recordResult
 
Methods inherited from class org.finra.jtaf.core.model.invocationtarget.InvocationTarget
addOptionalParameter, addProduction, addRequiredParameter, cleanGlobalContext, getAllParameters, getFromGlobalContext, getGlobalContext, getName, getOptionalParameters, getProductions, getRequiredParameters, getUsage, putToGlobalContext, setGlobalContext, setUsage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FailHere

public FailHere(String name)
         throws NameFormatException
This called when instantiating the command before it is executed by the interpreter

Parameters:
name - - The name of the command
Throws:
NameFormatException
Method Detail

execute

protected void execute(IInvocationContext ctx)
                throws Throwable
This method throws an AssertionFailedException to force a failure.

Specified by:
execute in class Command
Parameters:
ctx - - The current context when this method is executed.
Throws:
Throwable - - The AssertionFailedException


Copyright © 2014. All rights reserved.