Interface MethodOrderer

    • Method Detail

      • getDefaultExecutionMode

        default Optional<ExecutionMode> getDefaultExecutionMode()
        Get the default ExecutionMode for the test class configured with this MethodOrderer.

        This method is guaranteed to be invoked after orderMethods(MethodOrdererContext) which allows implementations of this method to determine the appropriate return value programmatically, potentially based on actions that were taken in orderMethods().

        Defaults to SAME_THREAD, since ordered methods are typically sorted in a fashion that would conflict with concurrent execution.

        In case the ordering does not conflict with concurrent execution, implementations should return an empty Optional to signal that the engine should decide which execution mode to use.

        Can be overridden via an explicit @Execution declaration on the test class or in concrete implementations of the MethodOrderer API.

        the default ExecutionMode; never null but potentially empty
        See Also: