Class Result

java.lang.Object
com.avoka.fc.core.test.func.Result

public class Result extends Object
Provides the FormCmdTestRunner test Result class.
Since:
17.10.0
  • Field Details

    • name

      public final String name
      The test name.
    • statusCode

      public final int statusCode
      The HTTP result status code.
    • responseBody

      public final String responseBody
      The HTTP response body.
    • responseMap

      public final Map responseMap
      The HTTP response body JSON map.
    • txn

      public final Txn txn
      The submission object resulting from the test execution.
    • assertionErrors

      public final List<String> assertionErrors
      The list of test execution assertion errors.
  • Constructor Details

    • Result

      public Result(String name, int statusCode, String httpResponse, Map responseMap, Submission submission, List<String> assertionErrors)
      Create an immutable test Result object.
      Parameters:
      name - the test name
      statusCode - the HTTP status code
      httpResponse - the response body
      responseMap - the JSON response map
      submission - the test submission
      assertionErrors - the test assertion errors
  • Method Details

    • isValid

      public boolean isValid()
      Return true if the test has no test assertion failures.
      Returns:
      true if the test has no test assertion failures.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      a string representation of the object.