Enum DelegateExpressions

    • Method Detail

      • values

        public static DelegateExpressions[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DelegateExpressions c : DelegateExpressions.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DelegateExpressions valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • autoMock

        public static void autoMock​(@Nonnull
                                    String bpmnFileResource)
        Takes a BPMN resource and registers mocks for all delegateExpressions.
        Parameters:
        bpmnFileResource - the bpm file resource to parse
        See Also:
        autoMock(java.net.URL)
      • autoMock

        public static void autoMock​(@Nonnull
                                    URL bpmnFile)
        Takes a BPMN file and registers TaskListener-, ExecutionListener and JavaDelegate-Mocks for every delegateExpression encountered.

        This is an auto-mock feature that allows the process to run. If you need to modify the behavior of the mock, you can use the getXXX() methods to access it by its name.

        Parameters:
        bpmnFile - the BPMN resource to parse
      • registerJavaDelegateMock

        public static FluentJavaDelegateMock registerJavaDelegateMock​(Class<? extends org.camunda.bpm.engine.delegate.JavaDelegate> type)
        Registers a new FluentJavaDelegateMock instance for name (by type).
        Parameters:
        type - the type to register
        Returns:
        new fluent-mock instance
      • registerExecutionListenerMock

        public static FluentExecutionListenerMock registerExecutionListenerMock​(Class<? extends org.camunda.bpm.engine.delegate.ExecutionListener> type)
        Registers a new FluentExecutionListenerMock instance for name (by type).
        Parameters:
        type - the type to register
        Returns:
        new fluent-mock instance
      • registerTaskListenerMock

        public static FluentTaskListenerMock registerTaskListenerMock​(Class<? extends org.camunda.bpm.engine.delegate.TaskListener> type)
        Registers a new FluentTaskListenerMock instance for name (by type).
        Parameters:
        type - the type to register
        Returns:
        new fluent-mock instance
      • getJavaDelegateMock

        public static FluentJavaDelegateMock getJavaDelegateMock​(String name)
        Returns the registered FluentJavaDelegateMock instance for name.
        Parameters:
        name - the name under which the instance is registered
        Returns:
        the registered fluent-mock instance
        See Also:
        Expressions.getRegistered(String)
      • getExecutionListenerMock

        public static FluentExecutionListenerMock getExecutionListenerMock​(String name)
        Returns the registered FluentExecutionListenerMock instance for name.
        Parameters:
        name - the name under which the instance is registered
        Returns:
        the registered fluent-mock instance
        See Also:
        Expressions.getRegistered(String)
      • getTaskListenerMock

        public static FluentTaskListenerMock getTaskListenerMock​(String name)
        Returns the registered FluentTaskListenerMock instance for name.
        Parameters:
        name - the name under which the instance is registered
        Returns:
        the registered fluent-mock instance
        See Also:
        Expressions.getRegistered(String)
      • verifyJavaDelegateMock

        public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyJavaDelegateMock​(Class<?> type)
        Gets the registered FluentJavaDelegateMock and creates a verification instance.
        Parameters:
        type - the type of the delegate to lookup
        Returns:
        verification for JavaDelegate
      • verifyJavaDelegateMock

        public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyJavaDelegateMock​(FluentJavaDelegateMock fluentJavaDelegateMock)
        Creates a verification instance for JavaDelegate.
        Parameters:
        fluentJavaDelegateMock - the fluent-mock instance
        Returns:
        verification for JavaDelegate
      • verifyExecutionListenerMock

        public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyExecutionListenerMock​(Class<?> type)
        Gets the registered FluentExecutionListenerMock and creates a verification instance.
        Parameters:
        type - the type of the listener to lookup
        Returns:
        verification for ExecutionListener
      • verifyExecutionListenerMock

        public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyExecutionListenerMock​(FluentExecutionListenerMock fluentExecutionListenerMock)
        Creates a verification instance for ExecutionListener.
        Parameters:
        fluentExecutionListenerMock - the fluent-mock instance
        Returns:
        verification for JavaDelegate
      • verifyTaskListenerMock

        public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask> verifyTaskListenerMock​(Class<?> type)
        Gets the registered FluentExecutionListenerMock and creates a verification instance.
        Parameters:
        type - the type of the listener to lookup
        Returns:
        verification for TaskListener
      • verifyTaskListenerMock

        public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask> verifyTaskListenerMock​(FluentTaskListenerMock fluentTaskListenerMock)
        Creates a verification instance for TaskListener.
        Parameters:
        fluentTaskListenerMock - the fluent-mock instance
        Returns:
        verification for TaskListener