groat

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 1 Imported by: 0

README

Groat

Groat is lightweight toolkit for creation articulated declarative tests

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type After

type After[Depends any] func(t *testing.T, deps Depends)

type Before

type Before[Depends any] func(t *testing.T, deps Depends) Depends

type Case

type Case[Depends any, State any, SUT any] struct {
	State State
	Deps  Depends
	SUT   SUT

	T *testing.T
	// contains filtered or unexported fields
}

func New

func New[Depends any, State any, SUT any](
	t *testing.T,
	provider Provide[Depends, SUT],
	all ...Before[Depends],
) *Case[Depends, State, SUT]

func (*Case[Depends, State, SUT]) After

func (tcs *Case[Depends, State, SUT]) After(all ...After[Depends]) *Case[Depends, State, SUT]

func (*Case[Depends, State, SUT]) Before

func (tcs *Case[Depends, State, SUT]) Before(all ...Before[Depends])

func (*Case[Depends, State, SUT]) Given

func (tcs *Case[Depends, State, SUT]) Given(all ...Given[State]) *Case[Depends, State, SUT]

func (*Case[Depends, State, SUT]) Go

func (tcs *Case[Depends, State, SUT]) Go()

func (*Case[Depends, State, SUT]) Then

func (tcs *Case[Depends, State, SUT]) Then(all ...Then[State]) *Case[Depends, State, SUT]

func (*Case[Depends, State, SUT]) When

func (tcs *Case[Depends, State, SUT]) When(all ...When[Depends, State]) *Case[Depends, State, SUT]

type Given

type Given[State any] func(t *testing.T, state State) State

type Provide

type Provide[Depends any, SUT any] func(t *testing.T, deps Depends) SUT

type Then

type Then[State any] func(t *testing.T, state State)

type When

type When[Depends any, State any] func(t *testing.T, deps Depends, state State) State

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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