Class ExpectException


  • public class ExpectException
    extends Statement
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Class<? extends java.lang.Throwable> expected  
      private Statement next  
    • Constructor Summary

      Constructors 
      Constructor Description
      ExpectException​(Statement next, java.lang.Class<? extends java.lang.Throwable> expected)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void evaluate()
      Run the action, throwing a Throwable if anything goes wrong.
      • Methods inherited from class java.lang.Object

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

      • expected

        private final java.lang.Class<? extends java.lang.Throwable> expected
    • Constructor Detail

      • ExpectException

        public ExpectException​(Statement next,
                               java.lang.Class<? extends java.lang.Throwable> expected)
    • Method Detail

      • evaluate

        public void evaluate()
                      throws java.lang.Exception
        Description copied from class: Statement
        Run the action, throwing a Throwable if anything goes wrong.
        Specified by:
        evaluate in class Statement
        Throws:
        java.lang.Exception