Class ResettableExpectedExceptionRule

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public class ResettableExpectedExceptionRule
    extends Object
    implements org.junit.rules.TestRule
    A wrapper around ExpectedException rule which allows state reset. Necessary for some tests due to the stateful nature of the RepeatRule.
    • Constructor Detail

      • ResettableExpectedExceptionRule

        public ResettableExpectedExceptionRule()
    • Method Detail

      • reset

        public void reset()
      • expectMessage

        public void expectMessage​(String substring)
      • expectMessage

        public void expectMessage​(org.hamcrest.Matcher<String> matcher)
      • apply

        public org.junit.runners.model.Statement apply​(org.junit.runners.model.Statement base,
                                                       org.junit.runner.Description description)
        Specified by:
        apply in interface org.junit.rules.TestRule