- All Known Implementing Classes:
FakeResolution.Found,FakeResolution.KeyAbsent,FakeResolution.RunNotScripted
public sealed interface FakeResolution
permits FakeResolution.Found, FakeResolution.RunNotScripted, FakeResolution.KeyAbsent
Outcome of a single
FakeResponseSource.nextResponse(FakeInvocation) call. A sealed result (rather than a bare
Optional) so the client can raise the two distinct fail-closed errors — "no script registered for this run"
versus "this key is absent from the run's script" — from one atomic call, with no time-of-check/time-of-use gap and
no second query method.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA scripted response was found for the invocation's key.static final recordA script is registered for the run, but it has no entry for this key (the ordinal counter has already advanced past the miss — acceptable, since a miss is a fail-closed terminal).static final recordNo script is registered for the invocation's run.