fakes

package
v0.0.0-...-3fc8308 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeFactory

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

func NewFakeFactory

func NewFakeFactory() *FakeFactory

func (*FakeFactory) Create

func (f *FakeFactory) Create(method string) (boshaction.Action, error)

func (*FakeFactory) RegisterAction

func (f *FakeFactory) RegisterAction(method string, action *TestAction)

func (*FakeFactory) RegisterActionErr

func (f *FakeFactory) RegisterActionErr(method string, err error)

type FakeRunner

type FakeRunner struct {
	RunAction  boshaction.Action
	RunPayload []byte
	RunValue   interface{}
	RunErr     error

	ResumeAction  boshaction.Action
	ResumePayload []byte
	ResumeValue   interface{}
	ResumeErr     error
}

func (*FakeRunner) Resume

func (runner *FakeRunner) Resume(action boshaction.Action, payload []byte) (interface{}, error)

func (*FakeRunner) Run

func (runner *FakeRunner) Run(action boshaction.Action, payload []byte) (interface{}, error)

type TestAction

type TestAction struct {
	Asynchronous bool
	Persistent   bool

	ResumeValue interface{}
	ResumeErr   error
	Resumed     bool

	Canceled  bool
	CancelErr error
}

func (*TestAction) Cancel

func (a *TestAction) Cancel() error

func (*TestAction) IsAsynchronous

func (a *TestAction) IsAsynchronous() bool

func (*TestAction) IsPersistent

func (a *TestAction) IsPersistent() bool

func (*TestAction) Resume

func (a *TestAction) Resume() (interface{}, error)

func (*TestAction) Run

func (a *TestAction) Run(payload []byte) (interface{}, error)

Jump to

Keyboard shortcuts

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