testing

package
v0.0.0-...-a002913 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2015 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StubGetResource

func StubGetResource(resources StubResources) dependency.GetResourceFunc

StubGetResource returns a GetResourceFunc which will set outputs, or return errors, as defined by the supplied StubResources. Any unexpected usage of the result will return Errorf errors describing the problem; in particular, missing resources will not trigger dependency.ErrMissing unless specifically configured to do so.

Types

type StubResource

type StubResource struct {
	Output interface{}
	Error  error
}

StubResource is used to define the behaviour of a StubGetResource func for a particular resource name.

type StubResources

type StubResources map[string]StubResource

StubResources defines the complete behaviour of a StubGetResource func.

Jump to

Keyboard shortcuts

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