Documentation ¶
Index ¶
- func RunTestingFile[State any, Command any, Event any](t *testing.T, fileName string, ...)
- type Case
- type Message
- type TestCase
- func (tc *TestCase[State, Command, Event]) Assert()
- func (tc *TestCase[State, Command, Event]) Catch(err error) *TestCase[State, Command, Event]
- func (tc *TestCase[State, Command, Event]) Given(events ...Event) *TestCase[State, Command, Event]
- func (tc *TestCase[State, Command, Event]) Then(event ...Event) *TestCase[State, Command, Event]
- func (tc *TestCase[State, Command, Event]) When(command Command) *TestCase[State, Command, Event]
- type TestingFile
- type UnmarshalMessage
- type UseCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunTestingFile ¶
func RunTestingFile[State any, Command any, Event any]( t *testing.T, fileName string, decider *onepiece.Decider[State, Command, Event], unmarshalCommand UnmarshalMessage[Command], unmarshalEvent UnmarshalMessage[Event], )
Types ¶
type TestCase ¶
type TestCase[State any, Command any, Event any] struct { // contains filtered or unexported fields }
func NewTestCase ¶
func (*TestCase[State, Command, Event]) Assert ¶
func (tc *TestCase[State, Command, Event]) Assert()
type TestingFile ¶
type TestingFile struct {
UseCases []UseCase `json:"useCases" yaml:"useCases"`
}
func NewTestingFile ¶
func NewTestingFile(t *testing.T, fileName string) *TestingFile
type UnmarshalMessage ¶
Click to show internal directories.
Click to hide internal directories.