ArrayTransport class
Array mail transport for testing.
Stores sent emails in memory for assertions in tests. Never actually sends emails.
- Implemented types
Constructors
Properties
- count → int
-
Gets the count of sent messages.
no setter
- firstSent → MailMessageInterface?
-
Gets the first sent message, or null if none sent.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasSent → bool
-
Checks if any messages were sent.
no setter
- lastSent → MailMessageInterface?
-
Gets the last sent message, or null if none sent.
no setter
- name → String
-
Gets the transport name/identifier.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sent
→ List<
MailMessageInterface> -
Gets all sent messages.
no setter
Methods
-
clear(
) → void - Clears all sent messages.
-
findSent(
bool predicate(MailMessageInterface)) → List< MailMessageInterface> - Gets all messages matching the predicate.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
MailMessageInterface message) → Future< bool> -
Sends an email message.
override
-
test(
) → Future< bool> -
Tests the transport connection.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
wasSent(
bool predicate(MailMessageInterface)) → bool - Checks if a message matching the predicate was sent.
-
wasSentTo(
String email) → bool - Asserts that a message was sent to the given address.
-
wasSentWithSubject(
String subject) → bool - Asserts that a message with the given subject was sent.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited