View Source
const Name = "default"

Name is Context Type name.


This section is empty.


func InvalidArgument

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

func NotFound(key string) error

NotFound is error returned when trying to get missing argument


type DefaultTestCaseContext

type DefaultTestCaseContext struct {
	// 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

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

GetBool returns bool from default context.

func (*DefaultTestCaseContext) GetComplex

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

GetComplex unmarshal argument in struct from default context.

func (*DefaultTestCaseContext) GetFloat

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

GetFloat returns float64 from default context.

func (*DefaultTestCaseContext) GetInt

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

GetInt returns int from default context.

func (*DefaultTestCaseContext) GetString

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

GetString returns string from default context.

func (*DefaultTestCaseContext) GetStringSlice

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.

Source Files