Class CloseToAssertion
java.lang.Object
org.elasticsearch.test.rest.yaml.section.Assertion
org.elasticsearch.test.rest.yaml.section.CloseToAssertion
- All Implemented Interfaces:
ExecutableSection
Represents a close_to assert section:
- close_to: { get.fields._routing: { value: 5.1, error: 0.00001 } }
-
Field Summary
Fields inherited from interface org.elasticsearch.test.rest.yaml.section.ExecutableSection
DEFAULT_EXECUTABLE_CONTEXTS, XCONTENT_REGISTRY -
Constructor Summary
ConstructorsConstructorDescriptionCloseToAssertion(XContentLocation location, String field, Object expectedValue, Double error) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidExecutes the assertion comparing the actual value (parsed from the response) with the expected onefinal doublegetError()static CloseToAssertionparse(XContentParser parser) Methods inherited from class org.elasticsearch.test.rest.yaml.section.Assertion
execute, getActualValue, getExpectedValue, getField, getLocation, resolveExpectedValue, safeClass
-
Constructor Details
-
CloseToAssertion
public CloseToAssertion(XContentLocation location, String field, Object expectedValue, Double error)
-
-
Method Details
-
parse
- Throws:
IOException
-
getError
public final double getError() -
doAssert
Description copied from class:AssertionExecutes the assertion comparing the actual value (parsed from the response) with the expected one
-