public abstract class JUnitProbe extends Object implements Probe
Probe
for cases in which the isSatisfied()
method can throw
exceptions or will perform JUnit/Hamcrest assertions, which result
in AssertionError
This implementation automatically takes care of catching those exceptions/errors
and returning false
in that caseConstructor and Description |
---|
JUnitProbe() |
Modifier and Type | Method and Description |
---|---|
String |
describeFailure()
Describes the cause of the criteria failure for further analysis.
|
boolean |
isSatisfied()
Invokes
test() and returns its outcome, provided that it didn't
threw any Exception or AssertionError . |
protected abstract boolean |
test()
Implement this method to provide your actual probing logic
|
public final boolean isSatisfied()
test()
and returns its outcome, provided that it didn't
threw any Exception
or AssertionError
.
Returns false
otherwiseisSatisfied
in interface Probe
protected abstract boolean test() throws Exception
true
if the acceptance conditions was met. false
otherwiseException
public String describeFailure()
Probe
describeFailure
in interface Probe
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.