Class TransformAndSetSection
- java.lang.Object
-
- org.elasticsearch.test.rest.yaml.section.TransformAndSetSection
-
- All Implemented Interfaces:
ExecutableSection
public class TransformAndSetSection extends java.lang.Object implements ExecutableSection
Represents a transform_and_set section:In the following example,
- transform_and_set: { login_creds: "#base64EncodeCredentials(user,password)" }
user and password are from the response which are joined by ':' and Base64 encoded and then stashed as 'login_creds'
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.test.rest.yaml.section.ExecutableSection
DEFAULT_EXECUTABLE_CONTEXTS, XCONTENT_REGISTRY
-
-
Constructor Summary
Constructors Constructor Description TransformAndSetSection(XContentLocation location)
-
Method Summary
Modifier and Type Method Description voidaddSet(java.lang.String stashedField, java.lang.String transformThis)voidexecute(ClientYamlTestExecutionContext executionContext)Executes the section passing in the execution contextXContentLocationgetLocation()Get the location in the test that this was defined.java.util.Map<java.lang.String,java.lang.String>getStash()static TransformAndSetSectionparse(XContentParser parser)
-
-
-
Constructor Detail
-
TransformAndSetSection
public TransformAndSetSection(XContentLocation location)
-
-
Method Detail
-
parse
public static TransformAndSetSection parse(XContentParser parser) throws java.io.IOException
- Throws:
java.io.IOException
-
addSet
public void addSet(java.lang.String stashedField, java.lang.String transformThis)
-
getStash
public java.util.Map<java.lang.String,java.lang.String> getStash()
-
getLocation
public XContentLocation getLocation()
Description copied from interface:ExecutableSectionGet the location in the test that this was defined.- Specified by:
getLocationin interfaceExecutableSection
-
execute
public void execute(ClientYamlTestExecutionContext executionContext) throws java.io.IOException
Description copied from interface:ExecutableSectionExecutes the section passing in the execution context- Specified by:
executein interfaceExecutableSection- Throws:
java.io.IOException
-
-