Package org.citrusframework.generate.xml
Class XsdXmlTestGenerator
java.lang.Object
org.citrusframework.generate.AbstractTestGenerator<T>
org.citrusframework.generate.AbstractTemplateBasedTestGenerator<T>
org.citrusframework.generate.xml.XmlTestGenerator<T>
org.citrusframework.generate.xml.MessagingXmlTestGenerator<XsdXmlTestGenerator>
org.citrusframework.generate.xml.XsdXmlTestGenerator
- All Implemented Interfaces:
TestGenerator<XsdXmlTestGenerator>,XsdTestGenerator<XsdXmlTestGenerator>
public class XsdXmlTestGenerator
extends MessagingXmlTestGenerator<XsdXmlTestGenerator>
implements XsdTestGenerator<XsdXmlTestGenerator>
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 org.citrusframework.generate.TestGenerator
TestGenerator.GeneratorMode -
Field Summary
Fields inherited from class org.citrusframework.generate.AbstractTestGenerator
self -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()Create the test case.protected MessagegenerateInboundMessage(Message message) Inbound message generation hook for subclasses.protected MessagegenerateOutboundMessage(Message message) Outbound message generation hook for subclasses.Gets the nameSuffix.Gets the requestMessage.Gets the responseMessage.Suggest name of response element based on request message element name.Suggest name of test based on request message element name.getXsd()Gets the xsd.voidsetNameSuffix(String nameSuffix) Sets the nameSuffix.voidsetRequestMessage(String requestMessage) Sets the requestMessage.voidsetResponseMessage(String responseMessage) Sets the responseMessage.voidSets the xsd.withInboundMappingFile(String mappingFile) Add inbound XPath expression mappings file to manipulate inbound message content.withInboundMappings(Map<String, String> mappings) Add inbound XPath expression mappings to manipulate inbound message content.withNameSuffix(String suffix) Set the test name suffix to use.withOutboundMappingFile(String mappingFile) Add outbound XPath expression mappings file to manipulate outbound message content.withOutboundMappings(Map<String, String> mappings) Add outbound XPath expression mappings to manipulate outbound message content.withRequestMessage(String requestMessage) Set the request element name in xsd resource to use.withResponseMessage(String responseMessage) Set the response element name in xsd resource to use.Set the xsd schema resource to use.Methods inherited from class org.citrusframework.generate.xml.MessagingXmlTestGenerator
addRequestHeader, addResponseHeader, getActions, getEndpoint, getReceiveRequestActionProvider, getReceiveResponseActionProvider, getSendRequestActionProvider, getSendResponseActionProvider, setEndpoint, withEndpoint, withRequest, withResponseMethods inherited from class org.citrusframework.generate.xml.XmlTestGenerator
getJavaTestGenerator, getMarshaller, getMarshallerContextPaths, getMarshallerSchemas, getMode, getSrcDirectory, getTemplateFilePath, getTemplateProperties, setMarshaller, setMode, withModeMethods inherited from class org.citrusframework.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, withNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.citrusframework.generate.TestGenerator
getAuthor, getDescription, getFramework, getMode, getName, getTargetPackage, isDisabled, usePackage, useSrcDirectory, withAuthor, withDescription, withDisabled, withFramework, withMode, withNameMethods inherited from interface org.citrusframework.generate.XsdTestGenerator
withEndpoint
-
Constructor Details
-
XsdXmlTestGenerator
public XsdXmlTestGenerator()
-
-
Method Details
-
create
public void create()Description copied from class:AbstractTemplateBasedTestGeneratorCreate the test case.- Specified by:
createin interfaceTestGenerator<XsdXmlTestGenerator>- Overrides:
createin classXmlTestGenerator<XsdXmlTestGenerator>
-
generateInboundMessage
Description copied from class:MessagingXmlTestGeneratorInbound message generation hook for subclasses.- Overrides:
generateInboundMessagein classMessagingXmlTestGenerator<XsdXmlTestGenerator>- Returns:
-
generateOutboundMessage
Description copied from class:MessagingXmlTestGeneratorOutbound message generation hook for subclasses.- Overrides:
generateOutboundMessagein classMessagingXmlTestGenerator<XsdXmlTestGenerator>- Returns:
-
getResponseMessageSuggestion
Suggest name of response element based on request message element name.- Specified by:
getResponseMessageSuggestionin interfaceXsdTestGenerator<XsdXmlTestGenerator>- Returns:
-
getTestNameSuggestion
Suggest name of test based on request message element name.- Returns:
-
withXsd
Set the xsd schema resource to use.- Specified by:
withXsdin interfaceXsdTestGenerator<XsdXmlTestGenerator>- Parameters:
xsdResource-- Returns:
-
withRequestMessage
Set the request element name in xsd resource to use.- Specified by:
withRequestMessagein interfaceXsdTestGenerator<XsdXmlTestGenerator>- Parameters:
requestMessage-- Returns:
-
withResponseMessage
Set the response element name in xsd resource to use.- Specified by:
withResponseMessagein interfaceXsdTestGenerator<XsdXmlTestGenerator>- Parameters:
responseMessage-- Returns:
-
withNameSuffix
Set the test name suffix to use.- Specified by:
withNameSuffixin interfaceXsdTestGenerator<XsdXmlTestGenerator>- Parameters:
suffix-- Returns:
-
withInboundMappings
Add inbound XPath expression mappings to manipulate inbound message content.- Specified by:
withInboundMappingsin interfaceXsdTestGenerator<XsdXmlTestGenerator>- Parameters:
mappings-- Returns:
-
withOutboundMappings
Add outbound XPath expression mappings to manipulate outbound message content.- Specified by:
withOutboundMappingsin interfaceXsdTestGenerator<XsdXmlTestGenerator>- Parameters:
mappings-- Returns:
-
withInboundMappingFile
Add inbound XPath expression mappings file to manipulate inbound message content.- Specified by:
withInboundMappingFilein interfaceXsdTestGenerator<XsdXmlTestGenerator>- Parameters:
mappingFile-- Returns:
-
withOutboundMappingFile
Add outbound XPath expression mappings file to manipulate outbound message content.- Specified by:
withOutboundMappingFilein interfaceXsdTestGenerator<XsdXmlTestGenerator>- Parameters:
mappingFile-- Returns:
-
setXsd
Sets the xsd.- Parameters:
xsd-
-
getXsd
Gets the xsd.- Specified by:
getXsdin interfaceXsdTestGenerator<XsdXmlTestGenerator>- Returns:
-
setRequestMessage
Sets the requestMessage.- Parameters:
requestMessage-
-
getRequestMessage
Gets the requestMessage.- Specified by:
getRequestMessagein interfaceXsdTestGenerator<XsdXmlTestGenerator>- Returns:
-
setResponseMessage
Sets the responseMessage.- Parameters:
responseMessage-
-
getResponseMessage
Gets the responseMessage.- Specified by:
getResponseMessagein interfaceXsdTestGenerator<XsdXmlTestGenerator>- Returns:
-
setNameSuffix
Sets the nameSuffix.- Parameters:
nameSuffix-
-
getNameSuffix
Gets the nameSuffix.- Returns:
-