test

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCounterActivity added in v0.5.2

func NewCounterActivity() activity.Activity

NewActivity creates a new AppActivity

func NewLogActivity added in v0.5.2

func NewLogActivity() activity.Activity

NewActivity creates a new AppActivity

func NewTestModel

func NewTestModel() *model.FlowModel

Types

type CounterActivity added in v0.5.2

type CounterActivity struct {
	// contains filtered or unexported fields
}

func (*CounterActivity) Eval added in v0.5.2

func (a *CounterActivity) Eval(context activity.Context) (done bool, err error)

Eval implements api.Activity.Eval - Logs the Message

func (*CounterActivity) Metadata added in v0.5.2

func (a *CounterActivity) Metadata() *activity.Metadata

Metadata returns the activity's metadata

type LogActivity added in v0.5.2

type LogActivity struct {
	// contains filtered or unexported fields
}

func (*LogActivity) Eval added in v0.5.2

func (a *LogActivity) Eval(context activity.Context) (done bool, err error)

Eval implements api.Activity.Eval - Logs the Message

func (*LogActivity) Metadata added in v0.5.2

func (a *LogActivity) Metadata() *activity.Metadata

Metadata returns the activity's metadata

type TestActivityContext

type TestActivityContext struct {
	TaskNameVal string
	Attrs       map[string]*data.Attribute
	// contains filtered or unexported fields
}

TestActivityContext is a dummy ActivityContext to assist in testing

func NewTestActivityContext

func NewTestActivityContext(metadata *activity.Metadata) *TestActivityContext

todo needs to move to lib NewTestActivityContext creates a new TestActivityContext

func NewTestActivityContextWithAction

func NewTestActivityContextWithAction(metadata *activity.Metadata, activityHost *TestActivityHost) *TestActivityContext

NewTestActivityContextWithAction creates a new TestActivityContext

func (*TestActivityContext) ActivityHost added in v0.5.2

func (c *TestActivityContext) ActivityHost() activity.Host

func (*TestActivityContext) FlowDetails

func (c *TestActivityContext) FlowDetails() activity.FlowDetails

func (*TestActivityContext) GetAttrType

func (c *TestActivityContext) GetAttrType(attrName string) (attrType data.Type, exists bool)

GetAttrType implements data.Scope.GetAttrType

func (*TestActivityContext) GetAttrValue

func (c *TestActivityContext) GetAttrValue(attrName string) (value string, exists bool)

GetAttrValue implements data.Scope.GetAttrValue

func (*TestActivityContext) GetInitValue added in v0.5.2

func (c *TestActivityContext) GetInitValue(key string) (value interface{}, exists bool)

GetInitValue implements activity.Context.GetInitValue

func (*TestActivityContext) GetInput

func (c *TestActivityContext) GetInput(name string) interface{}

GetInput implements activity.Context.GetInput

func (*TestActivityContext) GetOutput

func (c *TestActivityContext) GetOutput(name string) interface{}

GetOutput implements activity.Context.GetOutput

func (*TestActivityContext) GetSetting added in v0.5.2

func (c *TestActivityContext) GetSetting(setting string) (value interface{}, exists bool)

GetSetting implements activity.Context.GetSetting

func (*TestActivityContext) GetSharedTempData added in v0.5.6

func (c *TestActivityContext) GetSharedTempData() map[string]interface{}

func (*TestActivityContext) Name added in v0.5.2

func (c *TestActivityContext) Name() string

func (*TestActivityContext) SetAttrValue

func (c *TestActivityContext) SetAttrValue(attrName string, value string)

SetAttrValue implements data.Scope.SetAttrValue

func (*TestActivityContext) SetInput

func (c *TestActivityContext) SetInput(name string, value interface{})

SetInput implements activity.Context.SetInput

func (*TestActivityContext) SetOutput

func (c *TestActivityContext) SetOutput(name string, value interface{})

SetOutput implements activity.Context.SetOutput

func (*TestActivityContext) SetSetting added in v0.5.6

func (c *TestActivityContext) SetSetting(name string, value interface{})

SetInput implements activity.Context.SetInput

func (*TestActivityContext) TaskName

func (c *TestActivityContext) TaskName() string

TaskName implements activity.Context.TaskName

type TestActivityHost added in v0.5.2

type TestActivityHost struct {
	HostId  string
	HostRef string

	IoMetadata    *data.IOMetadata
	HostData      data.Scope
	ReplyData     map[string]interface{}
	ReplyDataAttr map[string]*data.Attribute
	ReplyErr      error
}

func (*TestActivityHost) GetResolver added in v0.5.2

func (ac *TestActivityHost) GetResolver() data.Resolver

func (*TestActivityHost) ID added in v0.5.2

func (ac *TestActivityHost) ID() string

func (*TestActivityHost) IOMetadata added in v0.5.2

func (ac *TestActivityHost) IOMetadata() *data.IOMetadata

func (*TestActivityHost) Name added in v0.5.2

func (ac *TestActivityHost) Name() string

func (*TestActivityHost) Ref added in v0.5.2

func (ac *TestActivityHost) Ref() string

func (*TestActivityHost) Reply added in v0.5.2

func (ac *TestActivityHost) Reply(data map[string]*data.Attribute, err error)

func (*TestActivityHost) Return added in v0.5.2

func (ac *TestActivityHost) Return(data map[string]*data.Attribute, err error)

func (*TestActivityHost) WorkingData added in v0.5.2

func (ac *TestActivityHost) WorkingData() data.Scope

type TestFlowDetails

type TestFlowDetails struct {
	FlowIDVal   string
	FlowNameVal string
}

TestFlowDetails simple FlowDetails for use in testing

func (*TestFlowDetails) ID

func (fd *TestFlowDetails) ID() string

ID implements activity.FlowDetails.ID

func (*TestFlowDetails) Name

func (fd *TestFlowDetails) Name() string

Name implements activity.FlowDetails.Name

func (*TestFlowDetails) ReplyHandler

func (fd *TestFlowDetails) ReplyHandler() activity.ReplyHandler

ReplyHandler implements activity.FlowDetails.ReplyHandler

Jump to

Keyboard shortcuts

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