spyAdapter

package
v0.0.0-...-5253b6b Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	Behavior    AdapterBehavior
	BuilderData *builderData
	HandlerData *handlerData
}

Adapter is a fake Adapter. It is used for controlling the Adapter's behavior as well as inspect the input values that adapter receives from Mixer

func NewSpyAdapter

func NewSpyAdapter(b AdapterBehavior) *Adapter

NewSpyAdapter returns a new instance of Adapter with the given behavior

func (*Adapter) GetAdptInfoFn

func (s *Adapter) GetAdptInfoFn() adapter.InfoFn

GetAdptInfoFn returns the infoFn for the Adapter.

type AdapterBehavior

type AdapterBehavior struct {
	Name    string
	Builder BuilderBehavior
	Handler HandlerBehavior
}

AdapterBehavior defines the behavior of the Adapter nolint: aligncheck

type BuilderBehavior

type BuilderBehavior struct {
	SetSampleReportTypesPanic bool

	SetAdapterConfigPanic bool

	ValidateErr   *adapter.ConfigErrors
	ValidatePanic bool

	BuildErr   error
	BuildPanic bool
}

BuilderBehavior defines the behavior of the Builder nolint: aligncheck

type HandlerBehavior

type HandlerBehavior struct {
	HandleSampleReportErr   error
	HandleSampleReportPanic bool

	CloseErr   error
	ClosePanic bool
}

HandlerBehavior defines the behavior of the Handler nolint: aligncheck

Jump to

Keyboard shortcuts

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