Class ValueContract

java.lang.Object
limn.testing.a11y.ValueContract

public final class ValueContract extends Object
What every widget of the VALUE shape owes a reader, as named cases over a ValueSubject: the number, its bounds and its step are the API's; INCREMENT and DECREMENT move by the step the facet names, clamped at the bounds, each heard once by the widget's own listener and announced, where announced, from the user; SET_VALUE takes a finite number and moves nothing for anything else; a read-only value offers no verb and moves for none; a disabled one withdraws its verbs and moves for none; and the node keeps its id as the number moves.

A refusal is read as an effect, never as the host's answer: Host#perform answers from the snapshot whether the node exists and posts the verb, so the hook's own refusal is invisible to the caller. What a refused verb owes is that nothing moved and nobody was told.

  • Method Details

    • cases

      public static List<ContractCase> cases(ValueSubject subject, UiRuntime runtime)
      The cases, in the order above.
      Parameters:
      subject - the widget under contract
      runtime - the installed runtime the harness drains verbs through
      Returns:
      the cases; a test runs each as a dynamic test