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 } }
  • Constructor Details

    • CloseToAssertion

      public CloseToAssertion(org.elasticsearch.xcontent.XContentLocation location, String field, Double expectedValue, Double error)
  • Method Details

    • parse

      public static CloseToAssertion parse(org.elasticsearch.xcontent.XContentParser parser) throws IOException
      Throws:
      IOException
    • getError

      public final double getError()
    • doAssert

      protected void doAssert(Object actualValue, Object expectedValue)
      Description copied from class: Assertion
      Executes the assertion comparing the actual value (parsed from the response) with the expected one
      Specified by:
      doAssert in class Assertion