Interface ResultComparator

  • All Known Implementing Classes:
    DefaultResultComparator

    public interface ResultComparator
    The result comparator is used to compare a result object returned by a fixture instance with a given expected result (from the test script).
    Author:
    Rene Schneider - initial API and implementation
    • Method Detail

      • compareResult

        ComparisonResult compareResult​(java.lang.Object aFixtureResult,
                                       ValueOrEnumValueOrOperationCollection anExpectedResult,
                                       FixtureWrapper<?> aFixtureInstance,
                                       MethodReference aFixtureMethod,
                                       java.lang.String aPropertyName)
                                throws java.lang.ClassNotFoundException,
                                       UnexecutableException,
                                       java.lang.InstantiationException
        Compares the expected result with the actual result obtained from a test fixture.
        Parameters:
        aFixtureResult - the test fixture result
        anExpectedResult - the expected result as specified in the test script
        aFixtureInstance - the fixture instance that was used
        aFixtureMethod - the fixture method that was called
        aPropertyName - the name of the result property to be compared (null if it's the default result)
        Returns:
        true if the comparison was successful, false if the results are not considered equal
        Throws:
        java.lang.ClassNotFoundException
        java.lang.InstantiationException
        UnexecutableException