Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Probe ¶
type Probe interface { // ExpectMessage asserts that the message received from the test actor is the expected one ExpectMessage(message proto.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) 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.