scenario

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(test *testing.T, title string) *scenario

Types

type Action

type Action func(args ...Argument) Responses

type Argument

type Argument any

type ArgumentProvider

type ArgumentProvider func() []Arguments

type Arguments

type Arguments []Argument

func Input

func Input(args ...Argument) Arguments

type Asserter

type Asserter func(t *testing.T, responses Responses)

type PanicHandler

type PanicHandler func(t *testing.T, err interface{})

type Response

type Response any

type Responses

type Responses []Response

func Output

func Output(responses ...Response) Responses

type ScenarioInterface

type ScenarioInterface interface {
	Given(...Argument) *scenario
	When(Action) *scenario
	Expect(...Response) *scenario
	ExpectTrue() *scenario
	ExpectFalse() *scenario
	ExpectZero() *scenario
	ExpectNil() *scenario
	ExpectPanic(any) *scenario
	ExpectWith(Asserter) *scenario
	ExpectPanicWith(PanicHandler) *scenario
	Run()
}

Jump to

Keyboard shortcuts

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