Action6<State, System, T1, T2, T3, T4, T5, T6, R> constructor

Action6<State, System, T1, T2, T3, T4, T5, T6, R>(
  1. String description,
  2. Arbitrary<T1> arbitrary1,
  3. Arbitrary<T2> arbitrary2,
  4. Arbitrary<T3> arbitrary3,
  5. Arbitrary<T4> arbitrary4,
  6. Arbitrary<T5> arbitrary5,
  7. Arbitrary<T6> arbitrary6, {
  8. required FutureOr<void> nextState(
    1. State,
    2. T1,
    3. T2,
    4. T3,
    5. T4,
    6. T5,
    7. T6,
    ),
  9. required FutureOr<R> run(
    1. System,
    2. T1,
    3. T2,
    4. T3,
    5. T4,
    6. T5,
    7. T6,
    ),
  10. FutureOr<bool> precondition(
    1. State,
    2. T1,
    3. T2,
    4. T3,
    5. T4,
    6. T5,
    7. T6,
    )?,
  11. FutureOr<bool> postcondition(
    1. State,
    2. T1,
    3. T2,
    4. T3,
    5. T4,
    6. T5,
    7. T6,
    8. R,
    )?,
})

Creates a new action command with 6 arbitraries.

Parameters:

  • description: The description of the action.
  • arbitrary1: The arbitrary used to generate the first value.
  • arbitrary2: The arbitrary used to generate the second value.
  • arbitrary3: The arbitrary used to generate the third value.
  • arbitrary4: The arbitrary used to generate the fourth value.
  • arbitrary5: The arbitrary used to generate the fifth value.
  • arbitrary6: The arbitrary used to generate the sixth value.
  • run: A function to perform the action.
  • precondition: A function to test the precondition of the action.
  • postcondition: A function to test the postcondition of the action.

Implementation

Action6(
  String description,
  Arbitrary<T1> arbitrary1,
  Arbitrary<T2> arbitrary2,
  Arbitrary<T3> arbitrary3,
  Arbitrary<T4> arbitrary4,
  Arbitrary<T5> arbitrary5,
  Arbitrary<T6> arbitrary6, {
  required FutureOr<void> Function(State, T1, T2, T3, T4, T5, T6) nextState,
  required FutureOr<R> Function(System, T1, T2, T3, T4, T5, T6) run,
  FutureOr<bool> Function(State, T1, T2, T3, T4, T5, T6)? precondition,
  FutureOr<bool> Function(State, T1, T2, T3, T4, T5, T6, R)? postcondition,
}) : super(
        description,
        combine6(
          arbitrary1,
          arbitrary2,
          arbitrary3,
          arbitrary4,
          arbitrary5,
          arbitrary6,
        ),
        nextState: (s, args) => nextState(
          s,
          args.$1,
          args.$2,
          args.$3,
          args.$4,
          args.$5,
          args.$6,
        ),
        run: (sys, args) =>
            run(sys, args.$1, args.$2, args.$3, args.$4, args.$5, args.$6),
        precondition: (s, args) => asyncCallOr(
          () => precondition?.call(
            s,
            args.$1,
            args.$2,
            args.$3,
            args.$4,
            args.$5,
            args.$6,
          ),
          true,
        ),
        postcondition: (s, args, r) => asyncCallOr(
          () => postcondition?.call(
            s,
            args.$1,
            args.$2,
            args.$3,
            args.$4,
            args.$5,
            args.$6,
            r,
          ),
          true,
        ),
      );