test

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEqualEvents

func AssertEqualEvents[Events ~[]event.Of[D], D any](t *testing.T, events ...Events)

AssertEqualEvents compares slices of events and reports an error to testing.T if they don't match.

func AssertEqualEventsUnsorted

func AssertEqualEventsUnsorted[Events ~[]event.Of[D], D any](t *testing.T, events ...Events)

AssertEqualEventsUnsorted does the same as AssertEqualEvents but ignores the order of the events.

func EqualEvents

func EqualEvents[Events ~[]event.Of[D], D any](events ...Events) bool

EqualEvents compares slices of events.

func NewEncoder

func NewEncoder() *codec.Registry

NewEncoder returns a *codec.Registry that can be used to encode and decode events. The Encoder returned by NewEncoder is pre-registered with the types FooEventData, BarEventData, BazEventData, and FoobarEventData.

Types

type BarEventData

type BarEventData struct{ A string }

BarEventData is a testing event data.

type BazEventData

type BazEventData struct{ A string }

BazEventData is a testing event data.

type FooEventData

type FooEventData struct{ A string }

FooEventData is a testing event data.

type FoobarEventData

type FoobarEventData struct{ A int }

FoobarEventData is a testing event data.

type UnregisteredEventData

type UnregisteredEventData struct{ A string }

UnregisteredEventData is a testing event data that's not registered in the Encoder returned by NewEncoder.

Jump to

Keyboard shortcuts

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