Builder

@ApiStatus.Experimental
class Builder

Collects scripted outcomes for a StubDecisionService. Get one from StubDecisionService.builder. A later outcome for the same key replaces the earlier one.

Functions

Link copied to clipboard

Scripts the outcome of assess with a PropositionRequest for a proposition text.

Link copied to clipboard

Returns a stub holding the outcomes scripted so far.

Link copied to clipboard

Sets the capabilities the stub reports. The default is every question kind.

Link copied to clipboard

Scripts the outcome of a choice question in ask, and of classify for a request whose question has this name.

Link copied to clipboard

Scripts the outcome of classify for a set of category ids, in any order.

Link copied to clipboard

Makes the stub answer each question on its own: a choice through classify, the other kinds through their per-question hooks. By default the stub answers a whole request in one question-set call.

Link copied to clipboard

Scripts the outcome of a proposition question in ask and in question assess calls.

Link copied to clipboard

Scripts the outcome of a rating question in ask and rate.