package
0.5.0
Repository: https://github.com/capatazlib/go-capataz.git
Documentation: pkg.go.dev

# README

State Machine (sm) Testing

This is an utility library that help developers collect notification events from an state machine in a concurrent-safe way, and help them assert these events match a given predicate and are delivered in a predetermined order.

This utility is used extensively by the Capataz library, but it can also be used by other concurrent algorithms that collect multiple events over callbacks.

# Functions

AssertExactMatch is an assertion that checks the input slice of EventP predicate match 1 to 1 with a given list of supervision system events.
AssertPartialMatch is an assertion that matches in order a list of EventP predicates to a list of supervision system events.
NewEventManager returns an EventManager instance that can be used to wait for events to happen on the observed supervision system.

# Structs

AndP is a predicate that builds the conjunction of a group EventP predicates (e.g.
EventIterator represents a single iteration over the list of events that have been collected by the EventManager that created it.
EventManager provides an API that allows to block a goroutine for particular events in a test system.
OrP is a predicate that builds the adjunction of a group EventP predicates (e.g.

# Interfaces

EventP represents a predicate function that allows us to assert properties of an Event signaled by the supervision system.