public abstract class Assertion extends java.lang.Object implements ExecutableSection
Modifier | Constructor and Description |
---|---|
protected |
Assertion(org.elasticsearch.common.xcontent.XContentLocation location,
java.lang.String field,
java.lang.Object expectedValue) |
Modifier and Type | Method and Description |
---|---|
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
|
void |
execute(ClientYamlTestExecutionContext executionContext)
Executes the section passing in the execution context
|
protected java.lang.Object |
getActualValue(ClientYamlTestExecutionContext executionContext) |
java.lang.Object |
getExpectedValue() |
java.lang.String |
getField() |
org.elasticsearch.common.xcontent.XContentLocation |
getLocation()
Get the location in the test that this was defined.
|
protected java.lang.Object |
resolveExpectedValue(ClientYamlTestExecutionContext executionContext) |
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)
|
protected Assertion(org.elasticsearch.common.xcontent.XContentLocation location, java.lang.String field, java.lang.Object expectedValue)
public final java.lang.String getField()
public final java.lang.Object getExpectedValue()
protected final java.lang.Object resolveExpectedValue(ClientYamlTestExecutionContext executionContext) throws java.io.IOException
java.io.IOException
protected final java.lang.Object getActualValue(ClientYamlTestExecutionContext executionContext) throws java.io.IOException
java.io.IOException
public org.elasticsearch.common.xcontent.XContentLocation getLocation()
ExecutableSection
getLocation
in interface ExecutableSection
public final void execute(ClientYamlTestExecutionContext executionContext) throws java.io.IOException
ExecutableSection
execute
in interface ExecutableSection
java.io.IOException
protected abstract void doAssert(java.lang.Object actualValue, java.lang.Object expectedValue)
protected java.lang.Class<?> safeClass(java.lang.Object o)