Package io.github.brantunger.unruly.test
Class ExpressionLanguageContractTest.Nesting
java.lang.Object
io.github.brantunger.unruly.test.ExpressionLanguageContractTest.Nesting
- Enclosing class:
ExpressionLanguageContractTest
The fact the nested-run checks run their rules against: its
value property starts a run nested inside
the run that reads it, on the same thread, as a getter a condition or an action reads, or a function it calls,
does when it runs rules. Only nestedRunInsideAnAction, nestedRunInsideACondition,
nestedRunFailsInsideACondition, nestedRunFailsInsideAnAction and
nestedRunFailureRethrownAsIs create one. It's public, with a public getter, so that a language can read
the property, by reflection or however else it reads a JavaBean's. It keeps what the nested run returned, or the
exception it threw, which the checks and NestedRuns read.-
Method Summary
-
Method Details
-
getValue
public int getValue()Starts the nested run, and returns 7 whether the run returned or threw an exception, unless it's the onenestedRunFailureRethrownAsIsgives the outer run, which throws on, unchanged, the exception the run threw; anErrorit threw is thrown on. The one a check gives the nested run itself, so that the nested run fails, throws anIllegalStateExceptioninstead, and starts nothing. The check looks for it among the causes and suppressed exceptions of the nested run's failure, or for its message there.- Returns:
- 7
-