Class RabbitListenerTestHarness

    • Constructor Detail

      • RabbitListenerTestHarness

        public RabbitListenerTestHarness​(AnnotationMetadata importMetadata)
    • Method Detail

      • getLambdaAnswerFor

        public <T> LambdaAnswer<T> getLambdaAnswerFor​(java.lang.String id,
                                                      boolean callRealMethod,
                                                      LambdaAnswer.ValueToReturn<T> callback)
        Return a LambdaAnswer that is properly configured to invoke the listener.
        Type Parameters:
        T - the return type.
        Parameters:
        id - the listener id.
        callRealMethod - true to call the real method.
        callback - the callback.
        Returns:
        the answer.
        Since:
        2.1.16
      • getNextInvocationDataFor

        public RabbitListenerTestHarness.InvocationData getNextInvocationDataFor​(java.lang.String id,
                                                                                 long wait,
                                                                                 java.util.concurrent.TimeUnit unit)
                                                                          throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • getSpy

        public <T> T getSpy​(java.lang.String id)
      • getDelegate

        public <T> T getDelegate​(java.lang.String id)
        Get the actual listener object (not the spy).
        Type Parameters:
        T - the type.
        Parameters:
        id - the id.
        Returns:
        the listener.
        Since:
        2.1.16