Class AssertJAssertionMethodInterceptor<T>

  • All Implemented Interfaces:
    org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

    public class AssertJAssertionMethodInterceptor<T>
    extends java.lang.Object
    implements org.aopalliance.intercept.MethodInterceptor
    The AssertJAssertionMethodInterceptor intercepts AssertJ Fluent API calls. It's capable of re-executing the assertion (and re-querying the supplied value) if an AssertionError occurs.
    Since:
    3.1.0
    Author:
    Oliver Libutzki <[email protected]>
    • Constructor Summary

      Constructors 
      Constructor Description
      AssertJAssertionMethodInterceptor​(java.lang.Class<T> targetClass, java.util.function.Supplier<T> targetSupplier, java.util.Optional<java.lang.Long> timeoutOptional)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object invoke​(org.aopalliance.intercept.MethodInvocation invocation)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AssertJAssertionMethodInterceptor

        public AssertJAssertionMethodInterceptor​(java.lang.Class<T> targetClass,
                                                 java.util.function.Supplier<T> targetSupplier,
                                                 java.util.Optional<java.lang.Long> timeoutOptional)
    • Method Detail

      • invoke

        public java.lang.Object invoke​(org.aopalliance.intercept.MethodInvocation invocation)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface org.aopalliance.intercept.MethodInterceptor
        Throws:
        java.lang.Throwable