Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶ added in v2.8.0
type Option interface { // Apply sets the Option value of a config. Apply(kit *TestKit) }
Option is the interface that applies a Testkit option.
func WithLogging ¶ added in v2.8.0
WithLogging sets the Testkit logger
type OptionFunc ¶ added in v2.8.0
type OptionFunc func(kit *TestKit)
OptionFunc implements the Option interface.
func (OptionFunc) Apply ¶ added in v2.8.0
func (f OptionFunc) Apply(kit *TestKit)
type Probe ¶
type Probe interface { // ExpectMessage asserts that the message received from the test actor is the expected one ExpectMessage(message proto.Message) // ExpectMessageWithin asserts that the message received from the test actor is the expected one within a time duration ExpectMessageWithin(duration time.Duration, message proto.Message) // ExpectNoMessage asserts that no message is expected ExpectNoMessage() // ExpectAnyMessage asserts that any message is expected ExpectAnyMessage() proto.Message // ExpectAnyMessageWithin asserts that any message within a time duration ExpectAnyMessageWithin(duration time.Duration) proto.Message // ExpectMessageOfType asserts the expectation of a given message type ExpectMessageOfType(messageType protoreflect.MessageType) // ExpectMessageOfTypeWithin asserts the expectation of a given message type within a time duration ExpectMessageOfTypeWithin(duration time.Duration, messageType protoreflect.MessageType) // Send sends a message to an actor and also provides probe's test actor PID as sender. Send(to *actors.PID, message proto.Message) // Sender returns the sender of last received message. Sender() *actors.PID // PID returns the pid of the test actor PID() *actors.PID // Stop stops the test probe Stop() }
Probe defines the probe interface that helps perform some assertions when implementing unit tests with actors
Click to show internal directories.
Click to hide internal directories.