Class ResettableExpectedExceptionRule

java.lang.Object
com.atlassian.bamboo.testutils.junit.rule.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 Details

    • ResettableExpectedExceptionRule

      public ResettableExpectedExceptionRule()
  • Method Details

    • reset

      public void reset()
    • expect

      public void expect(Class<? extends Throwable> type)
    • 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