watermilltest

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPubSub

func NewPubSub(tb TestingTB) *gochannel.GoChannel

func RunRouter

func RunRouter(tb TestingTB, rs ...Registerer) *message.Router

func RunRouterWithContext

func RunRouterWithContext(tb TestingTB, ctx context.Context, rs ...Registerer) *message.Router

Types

type MiddlewareRegisterer

type MiddlewareRegisterer struct {
	H message.HandlerMiddleware
}

func NewWaitForHandlerMiddleware

func NewWaitForHandlerMiddleware(handlerName string) (MiddlewareRegisterer, <-chan struct{})

func (MiddlewareRegisterer) Register

func (m MiddlewareRegisterer) Register(router *message.Router)

type Registerer

type Registerer interface {
	Register(router *message.Router)
}

type TestingTB

type TestingTB interface {
	Helper()
	Errorf(format string, args ...any)
	FailNow()
	Cleanup(f func())
}

TestingTB is a subset of the API provided by both *testing.T and *testing.B.

Jump to

Keyboard shortcuts

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