Class BasicTestResult

  • All Implemented Interfaces:
    TestResult

    public class BasicTestResult
    extends Object
    implements TestResult
    Describes a Context within a content instance where a DerivedRequirement was tested and found to be evaluated to some status. This class supports a list of result values that are generated during the assessment evaluation that further provide context. These values are used in the formatting of result messages based on the format string of the DerivedRequirement.
    • Constructor Detail

      • BasicTestResult

        public BasicTestResult​(String testId,
                               TestStatus result,
                               Context context)
        Construct a new test result.
        Parameters:
        testId - the identifier for the test performed
        result - the result of the test performed
        context - the document context associated with the test result
    • Method Detail

      • addResultValue

        public void addResultValue​(String value)
        Adds a new result value to the ordered collection of result values. This value must be non-null.
        Parameters:
        value - the new result value to add
      • addResultValues

        public void addResultValues​(Collection<String> values)
        Adds a number of new result value to the end of the ordered collection of result values. This value must be non-null.
        Parameters:
        values - the new result values to add
      • getContext

        public Context getContext()
        Description copied from interface: TestResult
        This is the location context of the test result within the tested content instance. Must be non-null. My trivially return the document root.
        Specified by:
        getContext in interface TestResult
        Returns:
        a context sub-class