Interface ResultAwareFixture


  • public interface ResultAwareFixture
    A fixture implementing this interface is notified by Integrity in advance of calling a fixture method, thereby telling the fixture instance about the (named) results that will be checked after the upcoming fixture method call has returned its result.

    This knowledge is usually not required by a fixture - it is simply intended to deliver all available result data, even though the test script author might not use all possible (named) results during a test invocation. Surplus data is then ignored. For simplicity, behaving like this should be the default way to go. But in some cases it can be beneficial to know about the actually-used named results in advance, in order to only return results that are being checked. This could be used for example for performance optimizations in cases in which a truly huge number of possible named results are to be compiled (or if compiling the results generally is an expensive task).
    Author:
    Rene Schneider - initial API and implementation
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void announceCheckedResults​(java.lang.String aMethodName, boolean aDefaultResultFlag, java.util.Set<java.lang.String> aNamedResultSet)
      Called by the Integrity Test Runner right before a fixture method is called in order to announce the methods' name as well as the extent to which the results returned by the fixture method will be checked later.
    • Method Detail

      • announceCheckedResults

        void announceCheckedResults​(java.lang.String aMethodName,
                                    boolean aDefaultResultFlag,
                                    java.util.Set<java.lang.String> aNamedResultSet)
        Called by the Integrity Test Runner right before a fixture method is called in order to announce the methods' name as well as the extent to which the results returned by the fixture method will be checked later. For 'call' invocations, this will always state that neither the default result flag nor a single named result set are to be checked (but the announce method will be called nevertheless for 'call' invocations as well!). For 'test' or 'tabletest' invocations, the availability of an expected default result (the implicit 'true' default result also counts here) and/or the availability of any named results are communicated accordingly.
        Parameters:
        aMethodName - The name of the fixture method to be invoked next
        aDefaultResultFlag - Whether the default result is checked
        aNamedResultSet - Any named results that are being checked (is never null; always supplies at least an empty set)