public class ResettableExpectedExceptionRule extends Object implements org.junit.rules.TestRule
ExpectedException
rule which allows state reset. Necessary for some tests due to the
stateful nature of the RepeatRule
.Constructor and Description |
---|
ResettableExpectedExceptionRule() |
Modifier and Type | Method and 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(org.hamcrest.Matcher<String> matcher) |
void |
expectMessage(String substring) |
void |
reset() |
public void reset()
public void expectMessage(String substring)
public void expectMessage(org.hamcrest.Matcher<String> matcher)
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
apply
in interface org.junit.rules.TestRule
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.