Package com.consol.citrus.generate.xml
Class WsdlXmlTestGenerator
- java.lang.Object
-
- com.consol.citrus.generate.AbstractTestGenerator<T>
-
- com.consol.citrus.generate.AbstractTemplateBasedTestGenerator<T>
-
- com.consol.citrus.generate.xml.XmlTestGenerator<T>
-
- com.consol.citrus.generate.xml.MessagingXmlTestGenerator<WsdlXmlTestGenerator>
-
- com.consol.citrus.generate.xml.WsdlXmlTestGenerator
-
- All Implemented Interfaces:
TestGenerator<WsdlXmlTestGenerator>,WsdlTestGenerator<WsdlXmlTestGenerator>
public class WsdlXmlTestGenerator extends MessagingXmlTestGenerator<WsdlXmlTestGenerator> implements WsdlTestGenerator<WsdlXmlTestGenerator>
Test generator creates one to many test cases based on operations defined in a XML schema XSD.- Since:
- 2.7.4
- Author:
- Christoph Deppisch
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.consol.citrus.generate.TestGenerator
TestGenerator.GeneratorMode
-
-
Field Summary
-
Fields inherited from class com.consol.citrus.generate.AbstractTestGenerator
log, self
-
-
Constructor Summary
Constructors Constructor Description WsdlXmlTestGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate()Create the test case.protected MessagegenerateInboundMessage(Message message)Inbound message generation hook for subclasses.protected MessagegenerateOutboundMessage(Message message)Outbound message generation hook for subclasses.protected List<String>getMarshallerContextPaths()Marshaller context paths.protected List<org.springframework.core.io.Resource>getMarshallerSchemas()Marshaller schema.StringgetNamePrefix()Gets the namePrefix.StringgetNameSuffix()Gets the nameSuffix.StringgetOperation()Gets the operation.StringgetWsdl()Gets the wsdl.voidsetNamePrefix(String namePrefix)Sets the namePrefix.voidsetNameSuffix(String nameSuffix)Sets the nameSuffix.voidsetOperation(String operation)Sets the operation.voidsetWsdl(String wsdl)Sets the wsdl.WsdlXmlTestGeneratorwithInboundMappingFile(String mappingFile)Add inbound XPath expression mappings file to manipulate inbound message content.WsdlXmlTestGeneratorwithInboundMappings(Map<String,String> mappings)Add inbound XPath expression mappings to manipulate inbound message content.WsdlXmlTestGeneratorwithNamePrefix(String prefix)Set the test name prefix to use.WsdlXmlTestGeneratorwithNameSuffix(String suffix)Set the test name suffix to use.WsdlXmlTestGeneratorwithOperation(String operation)Set the wsdl operation to use.WsdlXmlTestGeneratorwithOutboundMappingFile(String mappingFile)Add outbound XPath expression mappings file to manipulate outbound message content.WsdlXmlTestGeneratorwithOutboundMappings(Map<String,String> mappings)Add outbound XPath expression mappings to manipulate outbound message content.WsdlXmlTestGeneratorwithWsdl(String wsdlResource)Set the wsdl schema resource to use.-
Methods inherited from class com.consol.citrus.generate.xml.MessagingXmlTestGenerator
addRequestHeader, addResponseHeader, getActions, getEndpoint, getReceiveRequestActionProvider, getReceiveResponseActionProvider, getSendRequestActionProvider, getSendResponseActionProvider, setEndpoint, withEndpoint, withRequest, withResponse
-
Methods inherited from class com.consol.citrus.generate.xml.XmlTestGenerator
getJavaTestGenerator, getMarshaller, getMode, getSrcDirectory, getTemplateFilePath, getTemplateProperties, setMarshaller, setMode, withMode
-
Methods inherited from class com.consol.citrus.generate.AbstractTestGenerator
getAuthor, getCreationDate, getDescription, getFileExtension, getFramework, getMethodName, getName, getPackage, getTargetFile, getTargetPackage, getUpdateDateTime, isDisabled, setAuthor, setDescription, setDisabled, setFileExtension, setFramework, setName, setPackage, setSrcDirectory, setTargetPackage, usePackage, useSrcDirectory, withAuthor, withDescription, withDisabled, withFileExtension, withFramework, withName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.consol.citrus.generate.TestGenerator
getAuthor, getDescription, getFramework, getMode, getName, getTargetPackage, isDisabled, usePackage, useSrcDirectory, withAuthor, withDescription, withDisabled, withFramework, withMode, withName
-
Methods inherited from interface com.consol.citrus.generate.WsdlTestGenerator
withEndpoint
-
-
-
-
Method Detail
-
create
public void create()
Description copied from class:AbstractTemplateBasedTestGeneratorCreate the test case.- Specified by:
createin interfaceTestGenerator<WsdlXmlTestGenerator>- Overrides:
createin classXmlTestGenerator<WsdlXmlTestGenerator>
-
getMarshallerContextPaths
protected List<String> getMarshallerContextPaths()
Description copied from class:XmlTestGeneratorMarshaller context paths. Subclasses may add additional packages.- Overrides:
getMarshallerContextPathsin classXmlTestGenerator<WsdlXmlTestGenerator>- Returns:
-
getMarshallerSchemas
protected List<org.springframework.core.io.Resource> getMarshallerSchemas()
Description copied from class:XmlTestGeneratorMarshaller schema. Subclasses may overwrite schema or set to null to disable schema validation of marshalled data.- Overrides:
getMarshallerSchemasin classXmlTestGenerator<WsdlXmlTestGenerator>- Returns:
-
generateInboundMessage
protected Message generateInboundMessage(Message message)
Description copied from class:MessagingXmlTestGeneratorInbound message generation hook for subclasses.- Overrides:
generateInboundMessagein classMessagingXmlTestGenerator<WsdlXmlTestGenerator>- Returns:
-
generateOutboundMessage
protected Message generateOutboundMessage(Message message)
Description copied from class:MessagingXmlTestGeneratorOutbound message generation hook for subclasses.- Overrides:
generateOutboundMessagein classMessagingXmlTestGenerator<WsdlXmlTestGenerator>- Returns:
-
withWsdl
public WsdlXmlTestGenerator withWsdl(String wsdlResource)
Set the wsdl schema resource to use.- Specified by:
withWsdlin interfaceWsdlTestGenerator<WsdlXmlTestGenerator>- Parameters:
wsdlResource-- Returns:
-
withNameSuffix
public WsdlXmlTestGenerator withNameSuffix(String suffix)
Set the test name suffix to use.- Specified by:
withNameSuffixin interfaceWsdlTestGenerator<WsdlXmlTestGenerator>- Parameters:
suffix-- Returns:
-
withNamePrefix
public WsdlXmlTestGenerator withNamePrefix(String prefix)
Set the test name prefix to use.- Specified by:
withNamePrefixin interfaceWsdlTestGenerator<WsdlXmlTestGenerator>- Parameters:
prefix-- Returns:
-
withOperation
public WsdlXmlTestGenerator withOperation(String operation)
Set the wsdl operation to use.- Specified by:
withOperationin interfaceWsdlTestGenerator<WsdlXmlTestGenerator>- Parameters:
operation-- Returns:
-
withInboundMappings
public WsdlXmlTestGenerator withInboundMappings(Map<String,String> mappings)
Add inbound XPath expression mappings to manipulate inbound message content.- Specified by:
withInboundMappingsin interfaceWsdlTestGenerator<WsdlXmlTestGenerator>- Parameters:
mappings-- Returns:
-
withOutboundMappings
public WsdlXmlTestGenerator withOutboundMappings(Map<String,String> mappings)
Add outbound XPath expression mappings to manipulate outbound message content.- Specified by:
withOutboundMappingsin interfaceWsdlTestGenerator<WsdlXmlTestGenerator>- Parameters:
mappings-- Returns:
-
withInboundMappingFile
public WsdlXmlTestGenerator withInboundMappingFile(String mappingFile)
Add inbound XPath expression mappings file to manipulate inbound message content.- Specified by:
withInboundMappingFilein interfaceWsdlTestGenerator<WsdlXmlTestGenerator>- Parameters:
mappingFile-- Returns:
-
withOutboundMappingFile
public WsdlXmlTestGenerator withOutboundMappingFile(String mappingFile)
Add outbound XPath expression mappings file to manipulate outbound message content.- Specified by:
withOutboundMappingFilein interfaceWsdlTestGenerator<WsdlXmlTestGenerator>- Parameters:
mappingFile-- Returns:
-
setWsdl
public void setWsdl(String wsdl)
Sets the wsdl.- Parameters:
wsdl-
-
getWsdl
public String getWsdl()
Gets the wsdl.- Specified by:
getWsdlin interfaceWsdlTestGenerator<WsdlXmlTestGenerator>- Returns:
-
setNameSuffix
public void setNameSuffix(String nameSuffix)
Sets the nameSuffix.- Parameters:
nameSuffix-
-
getNameSuffix
public String getNameSuffix()
Gets the nameSuffix.- Specified by:
getNameSuffixin interfaceWsdlTestGenerator<WsdlXmlTestGenerator>- Returns:
-
setNamePrefix
public void setNamePrefix(String namePrefix)
Sets the namePrefix.- Parameters:
namePrefix-
-
getNamePrefix
public String getNamePrefix()
Gets the namePrefix.- Returns:
-
setOperation
public void setOperation(String operation)
Sets the operation.- Parameters:
operation-
-
getOperation
public String getOperation()
Gets the operation.- Specified by:
getOperationin interfaceWsdlTestGenerator<WsdlXmlTestGenerator>- Returns:
-
-