Class WithThrowable


  • public class WithThrowable
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Throwable throwable  
    • Constructor Summary

      Constructors 
      Constructor Description
      WithThrowable​(java.lang.Throwable exception)  
    • Field Detail

      • throwable

        private final java.lang.Throwable throwable
    • Constructor Detail

      • WithThrowable

        WithThrowable​(java.lang.Throwable exception)
    • Method Detail

      • withThrowableOfType

        public ThrowableAssertAlternative<?> withThrowableOfType​(java.lang.Class<? extends java.lang.Throwable> type)
        Checks that the underlying throwable is of the given type and returns a ThrowableAssertAlternative to chain further assertions on the underlying throwable.
        Parameters:
        type - the expected Throwable type
        Returns:
        a ThrowableAssertAlternative built with underlying throwable.