modernice / goes

goes is an event-sourcing framework for Go.
https://goes.modernice.dev
Apache License 2.0
134 stars 12 forks source link

Find testing functions #2

Closed bounoable closed 3 years ago

bounoable commented 3 years ago

Aggregate testing

package goestest

// Change tests that provided Aggregate has an uncommitted change with the given eventName.
func Change(_ *testing.T, _ aggregate.Aggregate, eventName string, _ ...ChangeOption)

// NoChange tests that provided Aggregate has no uncommitted change with the given eventName.
func NoChange(_ *testing.T, _ aggregate.Aggregate, eventName string, _ ...ChangeOption)

// WithEventData returns a ChangeOption that also compares the data of an uncommitted change with the provided data.
func WithEventData(data event.Data) ChangeOption {
}