Class Assertion

    • Constructor Detail

      • Assertion

        protected Assertion​(XContentLocation location,
                            java.lang.String field,
                            java.lang.Object expectedValue)
    • Method Detail

      • getField

        public final java.lang.String getField()
      • getExpectedValue

        public final java.lang.Object getExpectedValue()
      • resolveExpectedValue

        protected final java.lang.Object resolveExpectedValue​(ClientYamlTestExecutionContext executionContext)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getActualValue

        protected final java.lang.Object getActualValue​(ClientYamlTestExecutionContext executionContext)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • doAssert

        protected abstract void doAssert​(java.lang.Object actualValue,
                                         java.lang.Object expectedValue)
        Executes the assertion comparing the actual value (parsed from the response) with the expected one
      • safeClass

        protected java.lang.Class<?> safeClass​(java.lang.Object o)
        a utility to get the class of an object, protecting for null (i.e., returning null if the input is null)