com.eviware.soapui.impl.wsdl.teststeps
Class RestTestRequestStep

java.lang.Object
  extended by com.eviware.soapui.model.support.AbstractModelItem
      extended by com.eviware.soapui.model.support.AbstractAnimatableModelItem<com.eviware.soapui.config.ModelItemConfig>
          extended by com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem<com.eviware.soapui.config.TestStepConfig>
              extended by com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep
                  extended by com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStepWithProperties
                      extended by com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep
All Implemented Interfaces:
HttpRequestTestStep, HttpTestRequestStepInterface, RestTestRequestStepInterface, ModelItem, PropertyExpansionContainer, TestModelItem, TestPropertyHolder, Assertable, OperationTestStep, ResultContainer, TestStep, PropertyChangeNotifier, java.beans.PropertyChangeListener, java.util.EventListener

public class RestTestRequestStep
extends WsdlTestStepWithProperties
implements RestTestRequestStepInterface


Nested Class Summary
 class RestTestRequestStep.InternalInterfaceListener
           
 class RestTestRequestStep.InternalProjectListener
           
 class RestTestRequestStep.RequestHeaderHolder
           
 
Nested classes/interfaces inherited from interface com.eviware.soapui.model.testsuite.Assertable
Assertable.AssertionStatus
 
Field Summary
 
Fields inherited from interface com.eviware.soapui.model.testsuite.TestStep
DISABLED_PROPERTY
 
Fields inherited from interface com.eviware.soapui.model.ModelItem
DESCRIPTION_PROPERTY, ICON_PROPERTY, LABEL_PROPERTY, NAME_PROPERTY
 
Constructor Summary
RestTestRequestStep(WsdlTestCase testCase, com.eviware.soapui.config.TestStepConfig config, boolean forLoadTest)
           
 
Method Summary
 TestAssertion addAssertion(java.lang.String type)
           
 void addAssertionsListener(AssertionsListener listener)
           
 void beforeSave()
           
protected  RestTestRequest buildTestRequest(boolean forLoadTest)
           
 TestAssertion cloneAssertion(TestAssertion source, java.lang.String name)
           
protected  java.lang.String createDefaultRawResponseContent()
           
protected  java.lang.String createDefaultRequestContent()
           
protected  java.lang.String createDefaultResponseXmlContent()
           
 boolean dependsOn(AbstractWsdlModelItem<?> modelItem)
           
 java.lang.String getAssertableContent()
           
 TestAssertionRegistry.AssertableType getAssertableType()
           
 WsdlMessageAssertion getAssertionAt(int index)
           
 TestAssertion getAssertionByName(java.lang.String name)
           
 int getAssertionCount()
           
 java.util.List<TestAssertion> getAssertionList()
           
 java.util.Map<java.lang.String,TestAssertion> getAssertions()
           
 Assertable.AssertionStatus getAssertionStatus()
           
 java.lang.String getDefaultAssertableContent()
           
 java.lang.String getDescription()
           
 AbstractHttpRequest<?> getHttpRequest()
           
 javax.swing.ImageIcon getIcon()
           
 Interface getInterface()
           
 Operation getOperation()
           
 PropertyExpansion[] getPropertyExpansions()
           
 com.eviware.soapui.config.RestRequestStepConfig getRequestStepConfig()
           
 java.util.Collection<Interface> getRequiredInterfaces()
           
 RestResource getResource()
           
 java.lang.String getResourcePath()
           
 RestMethod getRestMethod()
           
 java.lang.String getService()
           
 RestTestRequest getTestRequest()
           
 TestStep getTestStep()
           
 TestAssertion moveAssertion(int ix, int offset)
           
 void prepare(TestCaseRunner testRunner, TestCaseRunContext testRunContext)
           
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void release()
           
 void removeAssertion(TestAssertion assertion)
           
 void removeAssertionsListener(AssertionsListener listener)
           
 void resetConfigOnMove(com.eviware.soapui.config.TestStepConfig config)
          Called from WsdlTestCase when moving a teststep due to no move functionality in xmlbeans generated arrays.
 void resolve(ResolveContext<?> context)
           
 TestStepResult run(TestCaseRunner runner, TestCaseRunContext runContext)
           
 void setRestMethod(RestMethod method)
           
 
Methods inherited from class com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStepWithProperties
addProperty, addProperty, addTestPropertyListener, deleteProperty, firePropertyAdded, firePropertyMoved, firePropertyRemoved, firePropertyRenamed, firePropertyValueChanged, getProperties, getProperty, getPropertyAt, getPropertyCount, getPropertyList, getPropertyNames, getPropertyValue, hasProperties, hasProperty, moveProperty, propertyRenamed, removeTestPropertyListener, setPropertyValue
 
Methods inherited from class com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep
afterCopy, cancel, clone, createPanelBuilder, finish, getDefaultSourcePropertyName, getDefaultTargetPropertyName, getLabel, getModelItem, getPropertiesLabel, getTestCase, getTestStepTitle, hasEditor, isDisabled, isForLoadTest, setDisabled, setName
 
Methods inherited from class com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem
afterLoad, dependsOn, getConfig, getId, getName, getParent, getSettings, getWsdlModelItemByName, setConfig, setDescription, setIcon, setSettings
 
Methods inherited from class com.eviware.soapui.model.support.AbstractModelItem
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, getChildren, notifyPropertyChanged, notifyPropertyChanged, notifyPropertyChanged, notifyPropertyChanged, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.eviware.soapui.impl.wsdl.teststeps.HttpTestRequestStepInterface
clone, getDefaultSourcePropertyName, getDefaultTargetPropertyName, getTestCase, setDescription, setName
 
Methods inherited from interface com.eviware.soapui.model.testsuite.TestStep
cancel, finish, getLabel, isDisabled
 
Methods inherited from interface com.eviware.soapui.model.ModelItem
getChildren, getId, getName, getParent, getSettings
 
Methods inherited from interface com.eviware.soapui.support.PropertyChangeNotifier
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface com.eviware.soapui.model.TestPropertyHolder
addTestPropertyListener, getModelItem, getProperties, getPropertiesLabel, getProperty, getPropertyAt, getPropertyCount, getPropertyList, getPropertyNames, getPropertyValue, hasProperty, removeTestPropertyListener, setPropertyValue
 
Methods inherited from interface com.eviware.soapui.model.testsuite.ResultContainer
getModelItem
 
Methods inherited from interface com.eviware.soapui.model.testsuite.Assertable
getModelItem
 

Constructor Detail

RestTestRequestStep

public RestTestRequestStep(WsdlTestCase testCase,
                           com.eviware.soapui.config.TestStepConfig config,
                           boolean forLoadTest)
                    throws RestRequestStepFactory.ItemDeletedException
Throws:
RestRequestStepFactory.ItemDeletedException
Method Detail

beforeSave

public void beforeSave()
Specified by:
beforeSave in interface HttpTestRequestStepInterface
Overrides:
beforeSave in class AbstractWsdlModelItem<com.eviware.soapui.config.TestStepConfig>

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface ModelItem
Overrides:
getDescription in class AbstractWsdlModelItem<com.eviware.soapui.config.TestStepConfig>

getRequestStepConfig

public com.eviware.soapui.config.RestRequestStepConfig getRequestStepConfig()
Specified by:
getRequestStepConfig in interface RestTestRequestStepInterface

buildTestRequest

protected RestTestRequest buildTestRequest(boolean forLoadTest)

getService

public java.lang.String getService()
Specified by:
getService in interface RestTestRequestStepInterface

getResourcePath

public java.lang.String getResourcePath()
Specified by:
getResourcePath in interface RestTestRequestStepInterface

createDefaultRawResponseContent

protected java.lang.String createDefaultRawResponseContent()

createDefaultResponseXmlContent

protected java.lang.String createDefaultResponseXmlContent()

createDefaultRequestContent

protected java.lang.String createDefaultRequestContent()

getRequiredInterfaces

public java.util.Collection<Interface> getRequiredInterfaces()
Overrides:
getRequiredInterfaces in class WsdlTestStep

getRestMethod

public RestMethod getRestMethod()
Specified by:
getRestMethod in interface RestTestRequestStepInterface

getResource

public RestResource getResource()
Specified by:
getResource in interface RestTestRequestStepInterface

getOperation

public Operation getOperation()
Specified by:
getOperation in interface OperationTestStep

release

public void release()
Specified by:
release in interface HttpTestRequestStepInterface
Overrides:
release in class AbstractWsdlModelItem<com.eviware.soapui.config.TestStepConfig>

resetConfigOnMove

public void resetConfigOnMove(com.eviware.soapui.config.TestStepConfig config)
Description copied from class: WsdlTestStep
Called from WsdlTestCase when moving a teststep due to no move functionality in xmlbeans generated arrays.

Specified by:
resetConfigOnMove in interface HttpTestRequestStepInterface
Overrides:
resetConfigOnMove in class WsdlTestStep
Parameters:
config - the new config to use, will be a copy of the existing one. The current will be invalid

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

dependsOn

public boolean dependsOn(AbstractWsdlModelItem<?> modelItem)
Specified by:
dependsOn in interface HttpTestRequestStepInterface
Overrides:
dependsOn in class WsdlTestStep

setRestMethod

public void setRestMethod(RestMethod method)

getTestRequest

public RestTestRequest getTestRequest()
Specified by:
getTestRequest in interface HttpRequestTestStep
Specified by:
getTestRequest in interface HttpTestRequestStepInterface

getInterface

public Interface getInterface()
Specified by:
getInterface in interface Assertable

getIcon

public javax.swing.ImageIcon getIcon()
Specified by:
getIcon in interface ModelItem
Overrides:
getIcon in class AbstractWsdlModelItem<com.eviware.soapui.config.TestStepConfig>

getTestStep

public TestStep getTestStep()
Specified by:
getTestStep in interface HttpRequestTestStep

resolve

public void resolve(ResolveContext<?> context)
Specified by:
resolve in interface HttpTestRequestStepInterface
Overrides:
resolve in class AbstractWsdlModelItem<com.eviware.soapui.config.TestStepConfig>

prepare

public void prepare(TestCaseRunner testRunner,
                    TestCaseRunContext testRunContext)
             throws java.lang.Exception
Specified by:
prepare in interface TestStep
Overrides:
prepare in class WsdlTestStep
Throws:
java.lang.Exception

getPropertyExpansions

public PropertyExpansion[] getPropertyExpansions()
Specified by:
getPropertyExpansions in interface PropertyExpansionContainer

getHttpRequest

public AbstractHttpRequest<?> getHttpRequest()
Specified by:
getHttpRequest in interface HttpRequestTestStep

addAssertion

public TestAssertion addAssertion(java.lang.String type)
Specified by:
addAssertion in interface Assertable

addAssertionsListener

public void addAssertionsListener(AssertionsListener listener)
Specified by:
addAssertionsListener in interface Assertable

cloneAssertion

public TestAssertion cloneAssertion(TestAssertion source,
                                    java.lang.String name)
Specified by:
cloneAssertion in interface Assertable

getAssertableContent

public java.lang.String getAssertableContent()
Specified by:
getAssertableContent in interface Assertable

getAssertableType

public TestAssertionRegistry.AssertableType getAssertableType()
Specified by:
getAssertableType in interface Assertable

getAssertionByName

public TestAssertion getAssertionByName(java.lang.String name)
Specified by:
getAssertionByName in interface Assertable

getAssertionList

public java.util.List<TestAssertion> getAssertionList()
Specified by:
getAssertionList in interface Assertable

getAssertionStatus

public Assertable.AssertionStatus getAssertionStatus()
Specified by:
getAssertionStatus in interface Assertable

removeAssertion

public void removeAssertion(TestAssertion assertion)
Specified by:
removeAssertion in interface Assertable

removeAssertionsListener

public void removeAssertionsListener(AssertionsListener listener)
Specified by:
removeAssertionsListener in interface Assertable

moveAssertion

public TestAssertion moveAssertion(int ix,
                                   int offset)
Specified by:
moveAssertion in interface Assertable

getAssertions

public java.util.Map<java.lang.String,TestAssertion> getAssertions()
Specified by:
getAssertions in interface Assertable

getAssertionAt

public WsdlMessageAssertion getAssertionAt(int index)
Specified by:
getAssertionAt in interface Assertable

getAssertionCount

public int getAssertionCount()
Specified by:
getAssertionCount in interface Assertable

getDefaultAssertableContent

public java.lang.String getDefaultAssertableContent()
Specified by:
getDefaultAssertableContent in interface Assertable

run

public TestStepResult run(TestCaseRunner runner,
                          TestCaseRunContext runContext)
Specified by:
run in interface TestStep


Copyright © 2005-2010 eviware.com. All Rights Reserved.