Package org.citrusframework.generate.xml
Class SwaggerXmlTestGenerator
java.lang.Object
org.citrusframework.generate.AbstractTestGenerator<T>
org.citrusframework.generate.AbstractTemplateBasedTestGenerator<T>
org.citrusframework.generate.xml.XmlTestGenerator<T>
org.citrusframework.generate.xml.MessagingXmlTestGenerator<SwaggerXmlTestGenerator>
org.citrusframework.generate.xml.SwaggerXmlTestGenerator
- All Implemented Interfaces:
SwaggerTestGenerator<SwaggerXmlTestGenerator>,TestGenerator<SwaggerXmlTestGenerator>
public class SwaggerXmlTestGenerator
extends MessagingXmlTestGenerator<SwaggerXmlTestGenerator>
implements SwaggerTestGenerator<SwaggerXmlTestGenerator>
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.Gets the contextPath.Marshaller context paths.Marshaller schema.Gets the namePrefix.Gets the nameSuffix.Gets the operation.Gets the swaggerResource.voidsetContextPath(String contextPath) Sets the contextPath.voidsetNamePrefix(String namePrefix) Sets the namePrefix.voidsetNameSuffix(String nameSuffix) Sets the nameSuffix.voidsetOperation(String operation) Sets the operation.voidsetSwaggerResource(String swaggerResource) Sets the swaggerResource.withContextPath(String contextPath) Set the server context path to use.withInboundMappingFile(String mappingFile) Add inbound JsonPath expression mappings file to manipulate inbound message content.withInboundMappings(Map<String, String> mappings) Add inbound JsonPath expression mappings to manipulate inbound message content.withNamePrefix(String prefix) Set the test name prefix to use.withNameSuffix(String suffix) Set the test name suffix to use.withOperation(String operation) Set the swagger operation to use.withOutboundMappingFile(String mappingFile) Add outbound JsonPath expression mappings file to manipulate outbound message content.withOutboundMappings(Map<String, String> mappings) Add outbound JsonPath expression mappings to manipulate outbound message content.Set the swagger Open API resource to use.Methods inherited from class org.citrusframework.generate.xml.MessagingXmlTestGenerator
addRequestHeader, addResponseHeader, generateInboundMessage, generateOutboundMessage, getActions, getEndpoint, getReceiveRequestActionProvider, getReceiveResponseActionProvider, getSendRequestActionProvider, getSendResponseActionProvider, setEndpoint, withEndpoint, withRequest, withResponseMethods inherited from class org.citrusframework.generate.xml.XmlTestGenerator
getJavaTestGenerator, getMarshaller, 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.SwaggerTestGenerator
withEndpointMethods inherited from interface org.citrusframework.generate.TestGenerator
getAuthor, getDescription, getFramework, getMode, getName, getTargetPackage, isDisabled, usePackage, useSrcDirectory, withAuthor, withDescription, withDisabled, withFramework, withMode, withName
-
Constructor Details
-
SwaggerXmlTestGenerator
public SwaggerXmlTestGenerator()
-
-
Method Details
-
create
public void create()Description copied from class:AbstractTemplateBasedTestGeneratorCreate the test case.- Specified by:
createin interfaceTestGenerator<SwaggerXmlTestGenerator>- Overrides:
createin classXmlTestGenerator<SwaggerXmlTestGenerator>
-
getMarshallerContextPaths
Description copied from class:XmlTestGeneratorMarshaller context paths. Subclasses may add additional packages.- Overrides:
getMarshallerContextPathsin classXmlTestGenerator<SwaggerXmlTestGenerator>- Returns:
-
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<SwaggerXmlTestGenerator>- Returns:
-
withSpec
Set the swagger Open API resource to use.- Specified by:
withSpecin interfaceSwaggerTestGenerator<SwaggerXmlTestGenerator>- Parameters:
swaggerResource-- Returns:
-
withContextPath
Set the server context path to use.- Parameters:
contextPath-- Returns:
-
withNamePrefix
Set the test name prefix to use.- Specified by:
withNamePrefixin interfaceSwaggerTestGenerator<SwaggerXmlTestGenerator>- Parameters:
prefix-- Returns:
-
withNameSuffix
Set the test name suffix to use.- Specified by:
withNameSuffixin interfaceSwaggerTestGenerator<SwaggerXmlTestGenerator>- Parameters:
suffix-- Returns:
-
withOperation
Set the swagger operation to use.- Specified by:
withOperationin interfaceSwaggerTestGenerator<SwaggerXmlTestGenerator>- Parameters:
operation-- Returns:
-
withInboundMappings
Add inbound JsonPath expression mappings to manipulate inbound message content.- Specified by:
withInboundMappingsin interfaceSwaggerTestGenerator<SwaggerXmlTestGenerator>- Parameters:
mappings-- Returns:
-
withOutboundMappings
Add outbound JsonPath expression mappings to manipulate outbound message content.- Specified by:
withOutboundMappingsin interfaceSwaggerTestGenerator<SwaggerXmlTestGenerator>- Parameters:
mappings-- Returns:
-
withInboundMappingFile
Add inbound JsonPath expression mappings file to manipulate inbound message content.- Specified by:
withInboundMappingFilein interfaceSwaggerTestGenerator<SwaggerXmlTestGenerator>- Parameters:
mappingFile-- Returns:
-
withOutboundMappingFile
Add outbound JsonPath expression mappings file to manipulate outbound message content.- Specified by:
withOutboundMappingFilein interfaceSwaggerTestGenerator<SwaggerXmlTestGenerator>- Parameters:
mappingFile-- Returns:
-
getSwaggerResource
Gets the swaggerResource.- Specified by:
getSwaggerResourcein interfaceSwaggerTestGenerator<SwaggerXmlTestGenerator>- Returns:
-
setSwaggerResource
Sets the swaggerResource.- Parameters:
swaggerResource-
-
getContextPath
Gets the contextPath.- Returns:
-
setContextPath
Sets the contextPath.- Parameters:
contextPath-
-
setNameSuffix
Sets the nameSuffix.- Parameters:
nameSuffix-
-
getNameSuffix
Gets the nameSuffix.- Specified by:
getNameSuffixin interfaceSwaggerTestGenerator<SwaggerXmlTestGenerator>- Returns:
-
setNamePrefix
Sets the namePrefix.- Parameters:
namePrefix-
-
getNamePrefix
Gets the namePrefix.- Returns:
-
setOperation
Sets the operation.- Parameters:
operation-
-
getOperation
Gets the operation.- Specified by:
getOperationin interfaceSwaggerTestGenerator<SwaggerXmlTestGenerator>- Returns:
-