Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker func(got []cqrs.DomainEvent, err error)
Checker asserts the given results.
type DispatcherTester ¶
DispatcherTester defines a dispatcher tester.
func Test ¶
func Test(t *testing.T) DispatcherTester
Test runs the test.
Example:
Test(t)( Given(dispatcher), When(testdata.TestCommand{Param: "param"}), Then(testdata.TestEvent{Data: "param"}), )
type GivenFn ¶
type GivenFn func() cqrs.CommandHandler
GivenFn is a test init function.
func Given ¶
func Given(dispatcher cqrs.CommandHandler) GivenFn
Given prepares the given aggregate for testing.
type ThenFn ¶
ThenFn prepares the Checker.
func Then ¶
func Then(want ...cqrs.DomainEvent) ThenFn
Then asserts that the expected events are applied.
func ThenFailWith ¶
ThenFailWith asserts that the expected error occurred.
Click to show internal directories.
Click to hide internal directories.