bdd

package
v0.0.0-...-d0276da Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature struct {
	// T should not be nil.
	*testing.T
	// contains filtered or unexported fields
}

Feature of the test file.

func NewFeature

func NewFeature(t *testing.T, name string) *Feature

NewFeature creates a new feature.

func (*Feature) And

func (f *Feature) And(and string, fn func())

And defines an and block.

func (*Feature) Background

func (f *Feature) Background(name string, fn func(t *testing.T, f *Feature))

Background defines a background block.

Notice: Background is not running for each step. Deprecated: the current template uses a new syntax.

func (*Feature) But

func (f *Feature) But(but string, fn func())

But defines a but block.

func (*Feature) Example

func (f *Feature) Example(name string, fn func(t *testing.T, f *Feature))

Example defines an example-scenario block.

func (*Feature) Given

func (f *Feature) Given(given string, fn func())

Given defines a given block.

func (*Feature) LogRecords

func (f *Feature) LogRecords() []string

LogRecords returns pending log records.

func (*Feature) Rule

func (f *Feature) Rule(name string, fn func(t *testing.T, f *Feature))

Rule defines a rule block.

func (*Feature) Scenario

func (f *Feature) Scenario(name string, fn func(t *testing.T, f *Feature))

Scenario defines a scenario block.

func (*Feature) TestCase

func (f *Feature) TestCase(name string, tc interface{}, fn func(t *testing.T, f *Feature))

TestCase defines a testcase block.

func (*Feature) TestCases

func (f *Feature) TestCases(testCases interface{}, fn interface{})

TestCases defines testcases block.

func (*Feature) Then

func (f *Feature) Then(then string, fn func())

Then defines a then block.

func (*Feature) When

func (f *Feature) When(when string, fn func())

When defines a when block.

Jump to

Keyboard shortcuts

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