Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TestInput

Utility to create Input objects for use in tests.

Hierarchy

  • TestInput

Properties

Static turnNumber

turnNumber: number = 1

Methods

Static intent

  • intent(nameOrIntent: string | Intent, slotValues?: undefined | object): ControlInput
  • Creates a ControlInput for a given Intent-name and slots, or complete Intent object.

    Parameters

    • nameOrIntent: string | Intent
    • Optional slotValues: undefined | object

    Returns ControlInput

Static launchRequest

  • Creates a ControlInput representing a LaunchRequest.

    Returns ControlInput

Static of

  • Creates a ControlInput for a given Intent-name or complete Intent object.

    Parameters

    • nameOrIntent: Intent | string

    Returns ControlInput

Static reset

  • reset(): void
  • Reset the turn counter.

    Returns void

Static simpleUserEvent

  • simpleUserEvent(args: any[], token?: string, locale?: string): ControlInput
  • Parameters

    • args: any[]
    • Default value token: string = "token"
    • Default value locale: string = "en-US"

    Returns ControlInput

Static userEvent

  • Creates a ControlInput for an APL User Event.

    Parameters

    • userEvent: UserEvent

    Returns ControlInput