Class CloseToAssertion
java.lang.Object
org.elasticsearch.test.rest.yaml.section.Assertion
org.elasticsearch.test.rest.yaml.section.CloseToAssertion
- All Implemented Interfaces:
ExecutableSection
public class CloseToAssertion extends Assertion
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
Constructors Constructor Description CloseToAssertion(org.elasticsearch.common.xcontent.XContentLocation location, java.lang.String field, java.lang.Double expectedValue, java.lang.Double error)
-
Method Summary
Modifier and Type Method Description protected void
doAssert(java.lang.Object actualValue, java.lang.Object expectedValue)
Executes the assertion comparing the actual value (parsed from the response) with the expected onedouble
getError()
static CloseToAssertion
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
CloseToAssertion
public CloseToAssertion(org.elasticsearch.common.xcontent.XContentLocation location, java.lang.String field, java.lang.Double expectedValue, java.lang.Double error)
-
-
Method Details
-
parse
public static CloseToAssertion parse(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException- Throws:
java.io.IOException
-
getError
public final double getError() -
doAssert
protected void doAssert(java.lang.Object actualValue, java.lang.Object expectedValue)Description copied from class:Assertion
Executes the assertion comparing the actual value (parsed from the response) with the expected one
-