registry

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEntryIsNotRegistered represents EntryIsNotRegistered error
	ErrEntryIsNotRegistered = errors.New("response entry is not registered")
)

Functions

This section is empty.

Types

type Registry

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

Registry for registration responses by method name and arguments and asserts with calls

func New

func New() *Registry

New creates new registry

func (*Registry) AddAssert

func (r *Registry) AddAssert(method string, args []lua.LValue, called bool) error

AddAssert add assert for test

func (*Registry) AddCall

func (r *Registry) AddCall(method string, args []lua.LValue) error

AddCall add call for test

func (*Registry) Clean

func (r *Registry) Clean()

Clean the registry

func (*Registry) Register

func (r *Registry) Register(anyValue, method string, callArgs, retArgs []lua.LValue) error

Register method call

func (*Registry) Response

func (r *Registry) Response(anyValue, method string, args []lua.LValue) ([]lua.LValue, error)

Response is register method response

func (*Registry) Result

func (r *Registry) Result() []modules.TestResult

Result returns registry results

Jump to

Keyboard shortcuts

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