Class ResettableExpectedExceptionRule
java.lang.Object
com.atlassian.bamboo.testutils.junit.rule.ResettableExpectedExceptionRule
- All Implemented Interfaces:
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.junit.runners.model.Statement
apply
(org.junit.runners.model.Statement base, org.junit.runner.Description description) void
void
expectMessage
(String substring) void
expectMessage
(org.hamcrest.Matcher<String> matcher) void
reset()
-
Constructor Details
-
ResettableExpectedExceptionRule
public ResettableExpectedExceptionRule()
-
-
Method Details
-
reset
public void reset() -
expect
-
expectMessage
-
expectMessage
-
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
-