integration

package
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: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrap

type Bootstrap[T any] func(ctx context.Context) (Injector[T], error)

Bootstrap prepare injectors for test cases.

type Container

type Container[Deps any, State any, SUT any] struct {
	// contains filtered or unexported fields
}

func New

func New[Deps any, State any, SUT any](
	m *testing.M,
	provider Provider[Deps, State, SUT],
	all ...Bootstrap[Deps],
) *Container[Deps, State, SUT]

func (*Container[Deps, State, SUT]) Case

func (c *Container[Deps, State, SUT]) Case(t *testing.T) *groat.Case[Deps, State, SUT]

func (*Container[Deps, State, SUT]) Go

func (c *Container[Deps, State, SUT]) Go() (res int)

type Injector

type Injector[T any] func(t *testing.T, injectTo T) T

Injector is type of function for inject dependencies to target struct.

type Provider

type Provider[Deps any, State any, SUT any] func(t *testing.T) *groat.Case[Deps, State, SUT]

Provider construct groat.Case for each running test.

Jump to

Keyboard shortcuts

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