Class LengthAssertion
java.lang.Object
org.elasticsearch.test.rest.yaml.section.Assertion
org.elasticsearch.test.rest.yaml.section.LengthAssertion
- All Implemented Interfaces:
ExecutableSection
Represents a length assert section:
- length: { hits.hits: 1 }
-
Field Summary
Fields inherited from interface org.elasticsearch.test.rest.yaml.section.ExecutableSection
DEFAULT_EXECUTABLE_CONTEXTS, XCONTENT_REGISTRY
-
Constructor Summary
ConstructorsConstructorDescriptionLengthAssertion(org.elasticsearch.common.xcontent.XContentLocation location, String field, Object expectedValue)
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Executes the assertion comparing the actual value (parsed from the response) with the expected onestatic LengthAssertion
parse(org.elasticsearch.common.xcontent.XContentParser parser)
Methods inherited from class org.elasticsearch.test.rest.yaml.section.Assertion
execute, getActualValue, getExpectedValue, getField, getLocation, resolveExpectedValue, safeClass
-
Constructor Details
-
LengthAssertion
-
-
Method Details
-
parse
public static LengthAssertion parse(org.elasticsearch.common.xcontent.XContentParser parser) throws IOException- Throws:
IOException
-
doAssert
Description copied from class:Assertion
Executes the assertion comparing the actual value (parsed from the response) with the expected one
-