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 aroundExpectedException
rule 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.Statement
apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
void
expect(Class<? extends Throwable> type)
void
expectMessage(String substring)
void
expectMessage(org.hamcrest.Matcher<String> matcher)
void
reset()
-
-
-
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 interfaceorg.junit.rules.TestRule
-
-