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 aroundExpectedExceptionrule which allows state reset. Necessary for some tests due to the stateful nature of theRepeatRule.
-
-
Constructor Summary
Constructors Constructor Description ResettableExpectedExceptionRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statementapply(org.junit.runners.model.Statement base, org.junit.runner.Description description)voidexpect(Class<? extends Throwable> type)voidexpectMessage(String substring)voidexpectMessage(org.hamcrest.Matcher<String> matcher)voidreset()
-
-
-
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:
applyin interfaceorg.junit.rules.TestRule
-
-