|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.canoo.webtest.steps.Step
com.canoo.webtest.steps.AbstractStepContainer
com.canoo.webtest.steps.control.IfStep
public class IfStep
| Field Summary |
|---|
| Fields inherited from class com.canoo.webtest.steps.Step |
|---|
DEFAULT_DESCRIPTION, ELEMENT_ATTRIBUTE_ID, ELEMENT_ATTRIBUTE_NAME, PROPERTY_TYPE_ANT, PROPERTY_TYPE_ANT_STRICT, PROPERTY_TYPE_DEFAULT, PROPERTY_TYPE_DYNAMIC |
| Fields inherited from class org.apache.tools.ant.Task |
|---|
target, taskName, taskType, wrapper |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
|---|
description, location, project |
| Constructor Summary | |
|---|---|
IfStep()
|
|
| Method Summary | |
|---|---|
void |
addCondition(GroupStep condition)
Handles the nested 'condition' tag. |
void |
addElse(GroupStep elseStep)
Handles the nested 'else' tag. |
void |
addOtherwise(GroupStep otherwiseStep)
Handles the nested 'otherwise' tag. |
void |
addThen(GroupStep then)
Handles the nested 'then' tag. |
void |
doExecute()
Execute all of the nested steps according to some condition. |
GroupStep |
getCondition()
|
GroupStep |
getElse()
|
GroupStep |
getOtherwise()
|
String |
getTest()
|
GroupStep |
getThen()
|
String |
getUnless()
|
protected boolean |
runNestedTests()
|
void |
setTest(String test)
|
void |
setUnless(String unless)
|
protected void |
verifyParameters()
Called to let the step's implementation validate its parameters. |
| Methods inherited from class com.canoo.webtest.steps.AbstractStepContainer |
|---|
addStep, addTask, executeContainedStep, executeContainedSteps, getSteps |
| Methods inherited from class org.apache.tools.ant.Task |
|---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
|---|
getDescription, getLocation, getProject, setDescription, setLocation, setProject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IfStep()
| Method Detail |
|---|
public void setTest(String test)
test - public String getTest()
public void setUnless(String unless)
unless - public String getUnless()
public void addCondition(GroupStep condition)
If all the steps contained in the 'condition' tag succeed, the 'ifStep' tag inner steps are executed
condition - The group of steps to execute to evaluate the test conditionpublic GroupStep getCondition()
public void addThen(GroupStep then)
If the 'ifStep' condition passes, execute all the steps in the 'then' inner group.
then - The group of steps to execute if the condition passespublic GroupStep getThen()
public void addElse(GroupStep elseStep)
If the 'ifStep' condition fails, execute all the steps in the 'else' inner group.
elseStep - The group of steps to execute if the condition failspublic GroupStep getElse()
public void addOtherwise(GroupStep otherwiseStep)
If the 'ifStep' condition fails, execute all the steps in the 'otherwise' inner group. An alias for 'else'; sometimes more convenient name when used from scripting languages, e.g. Groovy, where else is a keyword and must otherwise have single quotes around it.
otherwiseStep - The group of steps to execute if the condition failspublic GroupStep getOtherwise()
public void doExecute()
throws CloneNotSupportedException
The nested steps will be executed only if one of these conditions is true:
The 'test' property evaluates to true
All the steps contained in the nested 'test' tag succeed
The 'unless' property evaluates to false
One of the steps contained in the nested 'unless' tag fails
specifically:
| 'test' property | 'unless' property | nested 'condition' tag | execute? |
|---|---|---|---|
| true | missing | missing | yes |
| false | missing | missing | no |
| missing | missing | all tests succeed | yes |
| missing | missing | one test fails | no |
| missing | true | missing | no |
| missing | false | missing | yes |
doExecute in class StepStepFailedException - Raises this exception if one of the wrapped steps fails
CloneNotSupportedExceptionprotected void verifyParameters()
StepStep.doExecute().
This implementation does nothing, overwrite as needed.
verifyParameters in class Stepprotected boolean runNestedTests()
|
Copyright © 2001-2007 Canoo Engineering AG, Basel. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||