test

package
v0.36.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2019 License: AGPL-3.0 Imports: 23 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEqualJSON added in v0.23.0

func AssertEqualJSON(t *testing.T, expected json.RawMessage, actual json.RawMessage, msg string, msgArgs ...interface{}) bool

AssertEqualJSON checks two JSON strings for equality

func AssertXEqual added in v0.33.8

func AssertXEqual(t *testing.T, expected types.XValue, actual types.XValue, msgAndArgs ...interface{}) bool

func CreateSession added in v0.9.10

func CreateSession(assetsJSON json.RawMessage, testServerURL string) (flows.Session, error)

CreateSession creates a session with the given assets

func CreateTestSession

func CreateTestSession(testServerURL string, actionToAdd flows.Action) (flows.Session, []flows.Event, error)

CreateTestSession creates a standard example session for testing

func CreateTestVoiceSession added in v0.24.0

func CreateTestVoiceSession(testServerURL string, actionToAdd flows.Action) (flows.Session, []flows.Event, error)

CreateTestVoiceSession creates a standard example session for testing voice flows and actions

func LoadFlowFromAssets added in v0.29.0

func LoadFlowFromAssets(path string, uuid assets.FlowUUID) (flows.Flow, error)

func LoadSessionAssets added in v0.25.0

func LoadSessionAssets(path string) (flows.SessionAssets, error)

LoadSessionAssets loads a session assets instance from a static JSON file

func NewChannel added in v0.15.0

func NewChannel(name string, address string, schemes []string, roles []assets.ChannelRole, parent *assets.ChannelReference) *flows.Channel

func NewField added in v0.15.0

func NewField(key string, name string, valueType assets.FieldType) *flows.Field

func NewGroup added in v0.15.0

func NewGroup(name string, query string) *flows.Group

func NewTelChannel added in v0.15.0

func NewTelChannel(name string, address string, roles []assets.ChannelRole, parent *assets.ChannelReference, country string, matchPrefixes []string) *flows.Channel

func NewTestHTTPServer

func NewTestHTTPServer(port int) *httptest.Server

NewTestHTTPServer sets up a mock server for webhook actions

func NormalizeJSON added in v0.23.0

func NormalizeJSON(data json.RawMessage) ([]byte, error)

NormalizeJSON re-formats the given JSON

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL