Class XsdJavaTestGenerator
java.lang.Object
org.citrusframework.generate.AbstractTestGenerator<T>
org.citrusframework.generate.javadsl.JavaTestGenerator<T>
org.citrusframework.generate.javadsl.JavaDslTestGenerator<T>
org.citrusframework.generate.javadsl.MessagingJavaTestGenerator<XsdJavaTestGenerator>
org.citrusframework.generate.javadsl.XsdJavaTestGenerator
- All Implemented Interfaces:
TestGenerator<XsdJavaTestGenerator>,XsdTestGenerator<XsdJavaTestGenerator>
public class XsdJavaTestGenerator
extends MessagingJavaTestGenerator<XsdJavaTestGenerator>
implements XsdTestGenerator<XsdJavaTestGenerator>
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 tests with this generator.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.javadsl.MessagingJavaTestGenerator
addRequestHeader, addResponseHeader, createJavaFileBuilder, getActions, getEndpoint, getReceiveRequestCodeProvider, getReceiveResponseCodeProvider, getSendRequestCodeProvider, getSendResponseCodeProvider, setEndpoint, withEndpoint, withRequest, withResponseMethods inherited from class org.citrusframework.generate.javadsl.JavaDslTestGenerator
getBaseExtension, getCitrusAnnotationMethods inherited from class org.citrusframework.generate.javadsl.JavaTestGenerator
createAnnotationBuilder, getBaseType, getMode, getSrcDirectory, 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
-
XsdJavaTestGenerator
public XsdJavaTestGenerator()
-
-
Method Details
-
create
public void create()Description copied from interface:TestGeneratorCreate tests with this generator.- Specified by:
createin interfaceTestGenerator<XsdJavaTestGenerator>- Overrides:
createin classJavaTestGenerator<XsdJavaTestGenerator>
-
generateInboundMessage
Description copied from class:MessagingJavaTestGeneratorInbound message generation hook for subclasses.- Overrides:
generateInboundMessagein classMessagingJavaTestGenerator<XsdJavaTestGenerator>- Returns:
-
generateOutboundMessage
Description copied from class:MessagingJavaTestGeneratorOutbound message generation hook for subclasses.- Overrides:
generateOutboundMessagein classMessagingJavaTestGenerator<XsdJavaTestGenerator>- Returns:
-
getResponseMessageSuggestion
Suggest name of response element based on request message element name.- Specified by:
getResponseMessageSuggestionin interfaceXsdTestGenerator<XsdJavaTestGenerator>- 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<XsdJavaTestGenerator>- Parameters:
xsdResource-- Returns:
-
withRequestMessage
Set the request element name in xsd resource to use.- Specified by:
withRequestMessagein interfaceXsdTestGenerator<XsdJavaTestGenerator>- Parameters:
requestMessage-- Returns:
-
withResponseMessage
Set the response element name in xsd resource to use.- Specified by:
withResponseMessagein interfaceXsdTestGenerator<XsdJavaTestGenerator>- Parameters:
responseMessage-- Returns:
-
withNameSuffix
Set the test name suffix to use.- Specified by:
withNameSuffixin interfaceXsdTestGenerator<XsdJavaTestGenerator>- Parameters:
suffix-- Returns:
-
withInboundMappings
Add inbound XPath expression mappings to manipulate inbound message content.- Specified by:
withInboundMappingsin interfaceXsdTestGenerator<XsdJavaTestGenerator>- Parameters:
mappings-- Returns:
-
withOutboundMappings
Add outbound XPath expression mappings to manipulate outbound message content.- Specified by:
withOutboundMappingsin interfaceXsdTestGenerator<XsdJavaTestGenerator>- Parameters:
mappings-- Returns:
-
withInboundMappingFile
Add inbound XPath expression mappings file to manipulate inbound message content.- Specified by:
withInboundMappingFilein interfaceXsdTestGenerator<XsdJavaTestGenerator>- Parameters:
mappingFile-- Returns:
-
withOutboundMappingFile
Add outbound XPath expression mappings file to manipulate outbound message content.- Specified by:
withOutboundMappingFilein interfaceXsdTestGenerator<XsdJavaTestGenerator>- Parameters:
mappingFile-- Returns:
-
setXsd
Sets the xsd.- Parameters:
xsd-
-
getXsd
Gets the xsd.- Specified by:
getXsdin interfaceXsdTestGenerator<XsdJavaTestGenerator>- Returns:
-
setRequestMessage
Sets the requestMessage.- Parameters:
requestMessage-
-
getRequestMessage
Gets the requestMessage.- Specified by:
getRequestMessagein interfaceXsdTestGenerator<XsdJavaTestGenerator>- Returns:
-
setResponseMessage
Sets the responseMessage.- Parameters:
responseMessage-
-
getResponseMessage
Gets the responseMessage.- Specified by:
getResponseMessagein interfaceXsdTestGenerator<XsdJavaTestGenerator>- Returns:
-
setNameSuffix
Sets the nameSuffix.- Parameters:
nameSuffix-
-
getNameSuffix
Gets the nameSuffix.- Returns:
-