Package io.quarkus.mailer.runtime
Class MockMailboxImpl
- java.lang.Object
-
- io.quarkus.mailer.runtime.MockMailboxImpl
-
- All Implemented Interfaces:
MockMailbox
@ApplicationScoped public class MockMailboxImpl extends Object implements MockMailbox
Mock mailbox bean, will be populated if mocking emails.
-
-
Constructor Summary
Constructors Constructor Description MockMailboxImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Removes every sent message.List<Mail>getMessagesSentTo(String address)Returns a list of mails sent to the given address, whether it was via To, Cc or Bcc.intgetTotalMessagesSent()Gets the total number of messages sent.(package private) io.smallrye.mutiny.Uni<Void>send(Mail email)
-
-
-
Method Detail
-
getMessagesSentTo
public List<Mail> getMessagesSentTo(String address)
Description copied from interface:MockMailboxReturns a list of mails sent to the given address, whether it was via To, Cc or Bcc.- Specified by:
getMessagesSentToin interfaceMockMailbox- Parameters:
address- the email address we want to retrieve mail from- Returns:
- a list of messages sent to the given address, possibly empty.
-
clear
public void clear()
Description copied from interface:MockMailboxRemoves every sent message.- Specified by:
clearin interfaceMockMailbox
-
getTotalMessagesSent
public int getTotalMessagesSent()
Description copied from interface:MockMailboxGets the total number of messages sent. This counts every message sent to every recipient.- Specified by:
getTotalMessagesSentin interfaceMockMailbox- Returns:
- the total number of messages sent.
-
-