Class LengthAssertion

java.lang.Object
org.elasticsearch.test.rest.yaml.section.Assertion
org.elasticsearch.test.rest.yaml.section.LengthAssertion
All Implemented Interfaces:
ExecutableSection

public class LengthAssertion extends Assertion
Represents a length assert section:

- length: { hits.hits: 1 }

  • Constructor Details

    • LengthAssertion

      public LengthAssertion(org.elasticsearch.xcontent.XContentLocation location, String field, Object expectedValue)
  • Method Details

    • parse

      public static LengthAssertion parse(org.elasticsearch.xcontent.XContentParser parser) throws IOException
      Throws:
      IOException
    • 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