defaultctx

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "default"

Name is Context Type name.

Variables

This section is empty.

Functions

func InvalidArgument added in v0.10.0

func InvalidArgument(key string) error

InvalidArgument is error returned when trying to cast argument with wrong type

func New

func New() venom.TestCaseContext

New returns a new TestCaseContext.

func NotFound added in v0.10.0

func NotFound(key string) error

NotFound is error returned when trying to get missing argument

Types

type DefaultTestCaseContext

type DefaultTestCaseContext struct {
	venom.CommonTestCaseContext
	// contains filtered or unexported fields
}

DefaultTestCaseContext represents the context of a testcase.

func (*DefaultTestCaseContext) Close

func (tcc *DefaultTestCaseContext) Close() error

Close the context.

func (*DefaultTestCaseContext) GetBool added in v0.10.0

func (tcc *DefaultTestCaseContext) GetBool(key string) (bool, error)

GetBool returns bool from default context.

func (*DefaultTestCaseContext) GetComplex added in v0.10.0

func (tcc *DefaultTestCaseContext) GetComplex(key string, arg interface{}) error

GetComplex unmarshal argument in struct from default context.

func (*DefaultTestCaseContext) GetFloat added in v0.10.0

func (tcc *DefaultTestCaseContext) GetFloat(key string) (float64, error)

GetFloat returns float64 from default context.

func (*DefaultTestCaseContext) GetInt added in v0.10.0

func (tcc *DefaultTestCaseContext) GetInt(key string) (int, error)

GetInt returns int from default context.

func (*DefaultTestCaseContext) GetString added in v0.10.0

func (tcc *DefaultTestCaseContext) GetString(key string) (string, error)

GetString returns string from default context.

func (*DefaultTestCaseContext) GetStringSlice added in v0.10.0

func (tcc *DefaultTestCaseContext) GetStringSlice(key string) ([]string, error)

GetStringSlice returns string slice from default context.

func (*DefaultTestCaseContext) Init

func (tcc *DefaultTestCaseContext) Init() error

Init Initialize the context.

Jump to

Keyboard shortcuts

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