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(org.elasticsearch.xcontent.XContentLocation location, String field, Double 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(org.elasticsearch.xcontent.XContentParser parser) Methods inherited from class org.elasticsearch.test.rest.yaml.section.Assertion
execute, getActualValue, getExpectedValue, getField, getLocation, resolveExpectedValue, safeClass
-
Constructor Details
-
CloseToAssertion
-
-
Method Details
-
parse
public static CloseToAssertion parse(org.elasticsearch.xcontent.XContentParser parser) throws IOException - 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
-