public abstract class Assertion extends java.lang.Object implements ExecutableSection
| Modifier | Constructor and Description |
|---|---|
protected |
Assertion(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(RestTestExecutionContext executionContext)
Executes the section passing in the execution context
|
protected java.lang.Object |
getActualValue(RestTestExecutionContext executionContext) |
java.lang.Object |
getExpectedValue() |
java.lang.String |
getField() |
protected java.lang.Object |
resolveExpectedValue(RestTestExecutionContext 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(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(RestTestExecutionContext executionContext) throws java.io.IOException
java.io.IOExceptionprotected final java.lang.Object getActualValue(RestTestExecutionContext executionContext) throws java.io.IOException
java.io.IOExceptionpublic final void execute(RestTestExecutionContext executionContext) throws java.io.IOException
ExecutableSectionexecute in interface ExecutableSectionjava.io.IOExceptionprotected abstract void doAssert(java.lang.Object actualValue,
java.lang.Object expectedValue)
protected java.lang.Class<?> safeClass(java.lang.Object o)